Showing posts with label Git. Show all posts
Showing posts with label Git. Show all posts

Dec 20, 2021

How to find the parent between two Git branches

 In Git everything is a commit with a description. So you can find the latest common commit between two branches with git merge-base


git merge-base bug-1234 dev/project

7acf13c1390e451f721b3ae6779e8fca8f737b12


it will list the latest common commit between both the branches. i.e after this particular commit branch bug-1234 is branched out