本文介绍了hg传出(hg输出)或hg传入(hg输入)的git相当于什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hg outgoing或hg incoming的git相当于什么?

在Mercurial中, hg outgoing 列出了比服务器上的更新更新的变更集,并且如果我要执行 hg push ,将会发送这些变更集。相反, hg incoming 和 hg pull 。

解决方案

如果您想列出分支上的提交 B ,但不在分支上 A




$ b $如果你想列出你的提交本地分支 dev ,但不是远程分支 origin / dev ,do:

  git fetch origin#如果需要,更新原点/ dev 
git log原点/ dev.dev

如果您想列出远程分支上但不在本地分支上的提交,只需做相反处理:

  git fetch origin#如果需要,更新原点/ dev 
git log dev..origin / dev

注意:您可能会发现使用 gitk origin origin / dev


What is the git equivalent of of "hg outgoing" or "hg incoming"?

In Mercurial, hg outgoing lists the changesets that are newer than what's on the server and will be sent if I were to do hg push. Same in reverse for hg incoming and hg pull.

解决方案

If you want to list commits that are on branch B but not on branch A, do git log A..B.

If you want to list commits that are on your local branch dev, but not the the remote branch origin/dev, do:

git fetch origin             # Update origin/dev if needed
git log origin/dev..dev

If you want to list commits that are on the remote branch, but not on the local branch, simply do the converse:

git fetch origin             # Update origin/dev if needed
git log dev..origin/dev

Note: you might find it easier to compare branches graphically using gitk origin origin/dev

这篇关于hg传出(hg输出)或hg传入(hg输入)的git相当于什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-30 18:05