我如何运行git log来查看仅针对特定分支的更改? [英] How do I run git log to see changes only for a specific branch?
问题描述
我有一个本地分支跟踪远程/主分支。运行 git-pull
和 git-log
后,日志将显示远程跟踪分支中的所有提交以及当前分支。但是,因为对远程分支做了很多更改,所以我只需要看到对当前分支进行的提交。
Git命令是什么用于仅显示特定分支的提交?
注释:
配置信息:
[branchmy-branch]
remote = origin
merge = refs / heads / master
假设您的分支创建于 master
:
git cherry -v master
或
git log master ..
如果您的分支是由 origin / master
制成的,则说 origin / master
而不是 master
。
I have a local branch tracking the remote/master branch. After running git-pull
and git-log
, the log will show all commits in the remote tracking branch as well as the current branch. However, because there were so many changes made to the remote branch, I need to see just the commits made to the current local branch.
What would be the Git command to use to only show commits for a specific branch?
Notes:
Configuration information:
[branch "my-branch"]
remote = origin
merge = refs/heads/master
Assuming that your branch was created off of master
:
git cherry -v master
or
git log master..
If your branch was made off of origin/master
, then say origin/master
instead of master
.
这篇关于我如何运行git log来查看仅针对特定分支的更改?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!