本文介绍了如何列出所有未更改(跟踪)的文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我将较旧的"git-image"解压缩到我的git存储库中,并且大多数文件已更改.我想知道哪些文件保持不变.如何列出这些文件?
I unzipped an older "git-image" onto my git repository and most of the files have been changed. I would like to know which files remained untouched. How to list these files?
推荐答案我没有发现任何纯粹的git,但是通过一些bash可以实现:
I didn't find anything purely git, but with some bash it is possible:
( git ls-files --modified ; git ls-files ) | sort | uniq -u说明
- git ls-files列出git跟踪的所有文件
- git ls-files --modified列出了git跟踪的所有修改文件
- 其余是一些bash脚本,用于从两个列表中删除重复项.
- git ls-files lists all files tracked by git
- git ls-files --modified lists all the modified files tracked by git
- the rest is some bash scripting to remove the duplicates from both lists.
更多推荐
如何列出所有未更改(跟踪)的文件?
发布评论