I've just sync'd my git repo and ran into a regression. I'd like to just step through the history until I find the commit to blame, but there's been a huge merge which just shows up as a single commit when I do git log
.
Is there any way I can flatten this merge in my local branch so git log
just has a linear history I can walk through?
What you're looking for is interactive rebase.
You can rebase against master via git rebase -i master
. You should see something like
pick ba6b4b7 Commit messages here
pick 744ea3b Another commit message
pick 33539d5 Commits all around!
You can then change the "pick"s after the first one to "squash". This will squash them all in to the top commit. You can also change the top "pick" to "fixup" to change its commit message.
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