1

Git merge: why I saw some are "Merge branch 'master' of github.com:foo/bar", and some are "Merge remote-tracking branch 'origin/master'"?

In my understanding, "merge" always merge remote tracking branch.

user1914692
  • 3,033
  • 5
  • 36
  • 61

1 Answers1

2

If you do a git pull, the default merge message will include a reference to the upstream repo and the branch being fetched then merged (like github.com:foo/bar).

If you do a git merge, the default merge message will reference the upstream branch name (like origin/master)

You can see the merge commit message being formed in builtin/fmt-merge-msg.c of git fmt-merge-msg.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250