[英]How do I view of commit history of file in different branch without checking out that branch?
有什么方法可以强制“ git log”从其他分支读取提交历史记录?
You can use 您可以使用
git whatchanged branch filename
to get an overview of all the commits in which the file was changed in that branch. 以获得该分支中更改了文件的所有提交的概述。 And 和
git whatchanged -p branch filename
will give you detailed diffs of that file for each commit. 将为您提供每次提交该文件的详细差异。
只需输入“ git log branchname-filename”即可。
You can checkout a different branch without committing the branch you're currently in by using 您可以使用签出其他分支,而无需提交当前所在的分支
git checkout <<branchname>> -f
I am fairly sure that this will not affect your current (uncommited) branch 我相当确定这不会影响您当前(未提交)的分支
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.