How to unsquash a commit?
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.
- Work with merge of multiple git branches
- Github Private Team Separate SSH Keys
- Heroku — deployment from multiple computers?
- Working while waiting for pending PR
- Jenkins with Git - Merge another branch *into* the current branch before build
- How to re-generate an unresolved git merge file
2 Solutions collect form web for “How to unsquash a commit?”
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..