获取冲突文件列表的最简单方法是什么? [英] What's the simplest way to get a list of conflicted files?
本文介绍了获取冲突文件列表的最简单方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有比以下更简单的方法:
git ls-files -u | cut -f 2 | sort -u
或
git ls-files -u | awk'{print $ 4}'|排序| uniq
?
我想我可以为此设置了一个方便的别名,但是想知道专业人员是如何做到的。我会用它来编写shell循环自动解决冲突等。也许通过插入mergetool.cmd替换该循环?
解决方案
git diff --name-only --diff-filter = U
I just need a plain list of conflicted files.
Is there anything simpler than:
git ls-files -u | cut -f 2 | sort -u
or
git ls-files -u | awk '{print $4}' | sort | uniq
?
I guess I could set up a handy alias for that, however was wondering how pros do it. I'd use it to write shell loops e.g. to auto-resolve conflict etc.. Maybe replace that loop by plugging into mergetool.cmd?
解决方案
git diff --name-only --diff-filter=U
这篇关于获取冲突文件列表的最简单方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文