git 如何找出分支中哪些文件已被修改?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1749323/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How can I find out which files have been modified in a branch?
提问by zaza
I have two branches: master and bug1. I checked out bug1, did bunch of changes and multiple commits. How do I get a list of all files that were changed on the branch? I'm not interested in hashes, dates or any other commit related details. I just want to get a simple list of touched files.
我有两个分支:master 和 bug1。我检查了 bug1,做了大量的更改和多次提交。如何获取分支上更改的所有文件的列表?我对哈希、日期或任何其他与提交相关的细节不感兴趣。我只想得到一个简单的触摸文件列表。
回答by Cory Petosky
git diff --name-only master bug1
回答by Tim Henigan
From your master:
来自你的主人:
git diff --name-status BRANCH
git diff --name-status BRANCH
See the git diff
man pagefor details.
有关详细信息,请参阅git diff
手册页。