Skip to content

Instantly share code, notes, and snippets.

@code-vagabond
Created January 27, 2017 01:17
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 code-vagabond/a8800a19ca52b4ecb4f4f37d8bc630b6 to your computer and use it in GitHub Desktop.
Save code-vagabond/a8800a19ca52b4ecb4f4f37d8bc630b6 to your computer and use it in GitHub Desktop.
Setting your branch to exactly match the remote branch can be done in two steps:
git fetch origin
git reset --hard origin/master
If you want to save your current branch's state before doing this (just in case), you can do:
git commit -a -m "Saving my work, just in case"
git branch my-saved-work
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment