假设我在尝试 merge 并输入 git status
后有这个:
# Unmerged paths:
# (use "git add/rm <file>..." as appropriate to mark resolution)
#
# added by them: myfile1.xhtml
# added by them: myfile2.xhtml
# added by them: myfile3.xhtml
...我知道我想为每个文件执行此操作:
git checkout --theirs myfile1.xhtml
git add myfile1.xhtml
...但是有很多。我如何批量处理它们?
最佳答案
我的案例最终的解决方案是在目录路径中简单地使用通配符,因为文件已分组:
git checkout --theirs directory_name/*
git add directory_name/*
根据 helios456 的说法,这也可能有效:
git checkout --theirs directory_name/.
关于git - 如何为多个文件(或所有未 merge 的文件)执行 'git checkout --theirs',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24916186/