I have squashed 40 commmits at some point in time, and would like to pick back one commit. Is there some way to do this? I have the commit ref (93ebc467ff512580ae3c5a76790f09dfd5e3e6f2) that I would like to unsquash.
Git squash with a commit id You must type the word pick next to the commit you want all others to be squashed into. Then type 'squash', or just the letter 's', next to each commit to squash.
You can add the patch representing that commit onto the top of the branch you are on by doing
git cherry-pick 93ebc467ff512580ae3c5a76790f09dfd5e3e6f2
You could use git reflog
to browse all the commits that existed! Or since you have the commit hash you could just do a git checkout 93ebc467ff512580ae3c5a76790f09dfd5e3e6f2
and see the commit itself..
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