2 ms·
You can revert a merge commit by providing which side of the merge is mainline: git revert -m 1 $sha_of_the_merge_commit That provides the "revert a commi
by leejo 6y ago
You can revert a merge commit by providing which side of the merge is mainline:
git revert -m 1 $sha_of_the_merge_commit
That provides the "revert a commit and remove entire features" use case, assuming the original feature was all encapsulated within the merge (branch) in question. You can get the "readable commit history" with:
git log --no-merges
You can have the best of both worlds. git has had these features for as long as I can remember, but devs have had the "NO MERGES ONLY CLEAN HISTORY" platitude repeated so often they must think git lacks an alternative.