Git中@ {u}的含义是什么意思? [英] What does the argument @{u} mean in Git?
问题描述
在第69页的Git:版本控制for Everyone。初学者指南一书中,有一个建议:作为 git pull
的替代方案,我们也可以使用 git fetch
后跟 git merge @ {u}
。
In the book "Git: Version Control for Everyone. Beginner's Guide" on page 69 there is a suggestion: "As an alternative to git pull
, we can also use git fetch
followed by git merge @{u}
".
在这里 @ {u}
是指什么?
在Google中搜索 git merge @ {u}
提供此页面的链接 http://mislav.uniqpath.com/2013/02/merge-vs-rebase/ ,其中 @ {u}
也可以找到。
A search in Google for git merge @{u}
provides a link to this page http://mislav.uniqpath.com/2013/02/merge-vs-rebase/ where @{u}
can also be found.
推荐答案
这是一个快捷方式,可以引用当前分支正在跟踪的上游分支。因此,举例来说,如果您在分支 topic / fix_blub
跟踪 origin / topic / fix_blub
,则 git merge @ {u}
与做同样的事情git merge origin / topic / fix_blub
。
It is a shortcut to refer to the upstream branch which the current branch is tracking. So for instance if you're on branch topic/fix_blub
which is tracking origin/topic/fix_blub
then git merge @{u}
does the same thing as git merge origin/topic/fix_blub
.
@ {u}
是Git用于查找修订版的迷你语言的一部分,详细描述这里。
@{u}
is part of Git's mini-language for locating revisions, which is described in detail here.
这篇关于Git中@ {u}的含义是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!