Search code examples
gitsquash

Is it possible to get squashed commits' history back


Git rookie here. I squashed several commits into one commit and push the single commit to a remote repository already. Now I want to get some of squashed commits back. Is it possible?


Solution

  • See git reflog. If you are on the same machine you'll see something like

    image taken from gitready.com

    You can get back your commits back using git cherry-pick or see them using git show.

    For more details visit: this link