Let's say a dev team is supposed to commit all their changes to local branches, finish the feature inside the branch, followed by merging the branch into master.
How exactly can one find out if there were any commits made directly to master?
This will walk back the commit history of the branch master, taking the first/left parent of any merge commits (thus ignoring commits brought in by merges), and displays only those commits that are not merges:
git log master --first-parent --no-merges
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With