git pull command output message meaning into which branch

前端 未结 2 1480
执念已碎
执念已碎 2020-12-17 06:28

Say there is a remote branch br1 checkout on the remote repo, and the master branch on a local repo.

  • Command 1: If I do a \"

2条回答
  •  误落风尘
    2020-12-17 07:01

    Any line with origin/xxxx means the git fetch part of a git pull (which is git fetch + git merge) has updated a remote tracking branch.
    that is so since git 1.8.4 (before it only updated FETCH_HEAD).

    If I do just a "git pull", it will pull remote br1 into local master

    That would depend on git config branch.b1.merge, which instruct the git merge part of the git pull where to merge.
    By doing a git pull b1:b1, you are overriding that config and instructing the merge to take place in the local b1 branch.

    See also the result of git branch -avvv to see what local branch is tracking what remote branch.

    I'm expecting it also shows something like "br1 -> master". Why it does not show that?

    Maybe master was already at 97d4825.

提交回复
热议问题