工作副本和分支基础之间的git diff [英] git diff between working copy and branch base

查看:154
本文介绍了工作副本和分支基础之间的git diff的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以比较大师的贴士和我的工作拷贝与

  git diff master 

$ p
$ b

我可以比较当前分支的提示和它的合并基础, pre> git diff master ...

是a git diff 命令来比较当前分支和工作副本的合并基础?

解决方案


是否用 git diff 命令比较当前分支和工作副本的合并基础?


如果您当前的分支不是主设备,您可以尝试在bash shell中:

  git diff $(git merge-base --fork-point master)

如果使用 git merge-base $ - 叉点

  git merge- base -fork-point   




查找分支点或任何导致< commit> 的历史记录)从另一个分支(或任何引用)分支< ref>
这不仅仅是寻找两个提交的共同祖先,而且还考虑了< ref> 的引用日志来查看是否导致< commit> 从分支<< ref> 。



I can compare the tip of master and my working copy with

git diff master

I can compare the tip of the current branch with its merge base from master with

git diff master...

Is the a git diff command to compare the merge base of the current branch and the working copy?

Is the are git diff command to compare the merge base of the current branch and the working copy?

If you current branch is not master, you can try in a bash shell:

git diff $(git merge-base --fork-point master)

If uses git merge-base with --fork-point:

git merge-base --fork-point <ref> [<commit>]

Find the point at which a branch (or any history that leads to <commit>) forked from another branch (or any reference) <ref>.
This does not just look for the common ancestor of the two commits, but also takes into account the reflog of <ref> to see if the history leading to <commit> forked from an earlier incarnation of the branch <ref>.

这篇关于工作副本和分支基础之间的git diff的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆