相关疑难解决方法(0)

git checkout --ours不会从未合并文件列表中删除文件

嗨,我需要像这样合并两个分支.

这只是一个正在发生的事情的例子,我使用了数百个需要解决的文件.

git merge branch1
...conflicts...
git status
....
# Unmerged paths:
#   (use "git add/rm <file>..." as appropriate to mark resolution)
#
#   both added:   file1
#   both added:   file2
#   both added:   file3
#   both added:   file4
git checkout --ours file1
git chechout --theirs file2
git checkout --ours file3
git chechout --theirs file4
git commit -a -m "this should work"
U   file1
fatal: 'commit' is not possible because you have unmerged files.
Please, fix them up in the …
Run Code Online (Sandbox Code Playgroud)

git repository git-merge git-checkout git-branch

24
推荐指数
1
解决办法
1万
查看次数

标签 统计

git ×1

git-branch ×1

git-checkout ×1

git-merge ×1

repository ×1