gpt4 book ai didi

git - union 和 text 有什么区别?

转载 作者:太空狗 更新时间:2023-10-29 14:07:53 25 4
gpt4 key购买 nike

在 git repo 的根目录下有一个 .gitattributes 文件。该文件包含以下值:

*.txt     text merge=text
*.py text merge=union

merge=text 和 merge=union 有什么区别

最佳答案

Built-in merge drivers

There are a few built-in low-level merge drivers defined that can be asked for via the merge attribute.

text: Usual 3-way file level merge for text files. Conflicted regions are marked with conflict markers <<<<<<<, ======= and >>>>>>>. The version from your branch appears before the ======= marker, and the version from the merged branch appears after the ======= marker.

binary: Keep the version from your branch in the work tree, but leave the path in the conflicted state for the user to sort out.

union: Run 3-way file level merge for text files, but take lines from both versions, instead of leaving conflict markers. This tends to leave the added lines in the resulting file in random order and the user should verify the result. Do not use this if you do not understand the implications.

引用:http://schacon.github.io/git/gitattributes.html

关于git - union 和 text 有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22109586/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com