Skip to content

Instantly share code, notes, and snippets.

@AmilKey
Last active April 19, 2016 09:00
Show Gist options
  • Select an option

  • Save AmilKey/7b65c52c87e7ce54a1a4bd005ca84427 to your computer and use it in GitHub Desktop.

Select an option

Save AmilKey/7b65c52c87e7ce54a1a4bd005ca84427 to your computer and use it in GitHub Desktop.
RESET GIT COMMITS
You can reset your branch to the state it was in just before the merge if you find the commit it was on then.
One way is to use git reflog, it will list all the HEADs you've had.
I find that git reflog --relative-date is very useful as it shows how long ago each change happend.
Once you find that commit just do a git reset --hard <commit id> and your branch will be as it was before.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment