What does the argument @{u} mean in Git?

后端 未结 1 1195
傲寒
傲寒 2020-12-28 12:00

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

相关标签:
1条回答
  • 2020-12-28 12:41

    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} is part of Git's mini-language for locating revisions, which is described in detail here.

    0 讨论(0)
提交回复
热议问题