Little Git Tricks: Find the Last Common Commit in 2 Branches
If we want to find the newest commit that is in our main and in our feature branch, we can use this Git command:
1 |
git merge-base feature main |
1fe43981b856bkk8958494949494949494493339 This gives us the hash of the commit that is in both branches (in my example 1f439***). We can then see the details of that commit with git log: …