简体   繁体   English

如何显示所有已更改的文件?

[英]How to show all the files that have been changed?

I am working on a feature branch that branched off a develop branch. 我正在开发一个功能分支,该功能分支又来自开发分支。 Now that I am ready to do a PR I just want to check which files have been changed. 现在我准备进行PR,我只想检查哪些文件已更改。 What git command will list all the files changed against the develop branch? 哪个git命令将列出针对developer分支更改的所有文件?

Git's diff command with the --stat option will show you a list of changed files without the detailed contents. 带有--stat选项的Git diff命令将为您显示已更改文件的列表,但不包含详细内容。

Use it like git diff --stat origin/develop feature_branch git diff --stat origin/develop feature_branch一样使用它

If you want really basic results then you can instead use the --name-only option to just see the filenames and nothing else. 如果您想要真正的基本结果,则可以使用--name-only选项仅查看文件名,而没有其他内容。

git diff develop

Often the PR tool will show you the differences too. 通常,PR工具也会向您显示差异。

For example if Microsoft's Dev Ops (previously known as VSTS) when creating a pull request you can see the changes (and commits) at the bottom. 例如,如果Microsoft的Dev Ops(以前称为VSTS)在创建拉取请求时,您可以在底部看到更改(和提交)。

在此处输入图片说明

如果您只想查看文件名,则可以

git diff --name-only develop

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM