简体   繁体   English

git - 查找已创建的分支中已更改的文件

[英]git - find files changed in branch, since created

I would like to get a list of files which were changed in branch, since branch was created. 我想获得一个在分支中更改的文件列表,因为分支已创建。

Example: 例:

  • create branch B1 创建分支B1

  • commit change in file_1 在file_1中提交更改

  • commit change in file_2 在file_2中提交更改

Result should be: file_1 file_2 结果应为:file_1 file_2

How to do that? 怎么做?

I'm NOT interested in difference between Master and B1. 我对Master和B1之间的区别不感兴趣。

I'm interested in difference between current state of B1 and primary state of B1. 我对B1的当前状态和B1的主要状态之间的区别感兴趣。

Thanks for responses 谢谢你的回复

First, find the diverge point using 首先,使用找到分歧点

git merge-base master b1

Then use 然后用

git diff --stat <commit-id>..b1

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

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