Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When does git include the repository URL in merge commit messages?

Tags:

git

it came to my attention that the merge commit messages of my team members look differently depending on who is doing the commit.

Does anyone know: When does git suggest merge commit messages of the first form (i.e. stating the repo url explicitely), and when does it use the second form?

2017-07-05 11:34 Employee 1            M─│─┐ Merge branch 'wip-feature-1' of ssh://repo.company.com:1850/ttt/software into mainbranch
2017-07-05 10:45 Employee 2              │ │ M─┐ Merge branch 'wip-feature-2' into mainbranch

Thanks!

like image 396
Multisync Avatar asked Oct 17 '25 00:10

Multisync


1 Answers

I think they’re using git pull to do their merges. I can also get this with git merge FETCH_HEAD after fetching (which makes sense, since git-pull is documented to be the same as git merge FETCH_HEAD).

git merge with any argument other than FETCH_HEAD (or with no argument) doesn’t produce this message, it uses ‘remote-tracking branch’ or just ‘branch’ instead.

like image 58
Josh Lee Avatar answered Oct 19 '25 14:10

Josh Lee



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!