When you do git log
on a particular branch (e.g. develop), it looks like this:
commit 4499a58980e6ca8b140bf07665f47cca5f9036d8
Author: Axx <Axxor.com>
Date: Wed Sep 4 02:13:40 2024 +0100
Merge branch
'feature/Cxxxx' of
xxx into
feature/xxx
commit 288e4f76bf999846a03e77d7caa9c7a86adb91a5
Merge: 8ff8f10c 493ac769
Author: A.b <[email protected]>
Date: Thu Sep 12 18:36:02 2024 +0100
Merge branch 'staging' of xxx into feature/xxxx
One of the above has “merge” with two numbers.
- What do these two numbers mean? Are they some sort of link to the parents?
We use Bitbucket to merge all PRs. Bit bucket has 3 options “merge”, “squash” and FF.
- does the fact that some PR commits have merge numbers and some don’t mean different options were used to do the merge?
Because we are told FF is bad for history, all the devs should only be using “merge”.
-
would we be correct in assuming that “merge” option gives the two numbers, but “squash” and “FF” do not?
-
given the commit number is useful in commands like cherry-pick, do the merge numbers have any useful related commands?
7