Skip to content

Instantly share code, notes, and snippets.

@tonglu
Created June 3, 2014 17:00
Show Gist options
  • Save tonglu/5ae4f872a34c324c339c to your computer and use it in GitHub Desktop.
Save tonglu/5ae4f872a34c324c339c to your computer and use it in GitHub Desktop.
git checkout somecommit #revert back to an older commit
git stash #stash changes
git checkout -b new_branch #spin off to a new branch
git stash pop # restore the changes to the new branch
git add .
git commit -a -m
git push origin new_branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment