Skip to content

Instantly share code, notes, and snippets.

@karlcow
Last active May 19, 2017 22:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karlcow/5cd79259e696e0a52eaff35951b21803 to your computer and use it in GitHub Desktop.
Save karlcow/5cd79259e696e0a52eaff35951b21803 to your computer and use it in GitHub Desktop.
# done some commits on last version of master by mistakes
# and some modifications still not committed
git stash
git branch my_new_branch
git reset --hard origin/master
git checkout my_new_branch
git stash pop
# I'm now on my new branch as I should have been
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment