如何获得在分支上以及仅在GIT中的分支上进行的更改?
假设我有以下分支机构,
B---C---D---E---F---G feature
/ / \
--A---F---G---H----I------J master
有一个功能分支,通过合并主人的功能(Merge Consits B和E)会定期从主人那里刷新。当功能准备就绪时,它将合并到主(Merge Commit j)中,因此此时功能和主体是等效的。
我想查看或记录仅在功能分支上更改的内容,而无需合并提交(B和E)。因此,有什么办法可以在功能分支合并上查看更改。
谢谢。
Let's say, I have the following branches
B---C---D---E---F---G feature
/ / \
--A---F---G---H----I------J master
There's a feature branch which is periodically refreshed from master by merging master to feature (merge commits B and E). And when feature is ready it is merged into master (merge commit J), so at this point feature and master is equivalent.
I'd like to view or log what has changed only on feature branch without merge commits(B and E). So is there any way that I can view the changes only on feature branch combined.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有了您想要的任何详细信息,也许
- oneline-patch
。AFAIK没有便利命令在这里找到
a
,这是第一个父母合并基础,这是两个提示的第一父母的祖先中的最新提交,但这很容易做到:在您的悠久历史上, Rev-List的
- 父母
以及对堕落案例的特殊处理,可以使其始终快速运行。要将更改视为单个差异,您必须在没有合并的情况下构造尖端的外观。这很容易做到,你可以
with any details you want, maybe
--oneline --patch
.There's afaik no convenience command to find
A
here, the first-parent merge base, the most recent commit in two tips' first-parent ancestries, but it's pretty easy to do:and in really long histories you can get cute with rev-list's
--parents
and special handling for the degenerate cases to make it always run quick.To view the changes as a single diff, you'll have to construct what the tip would look like without the merges. That's easy enough to do, you can