Skip to content

Instantly share code, notes, and snippets.

@RobertoBarros
Last active April 19, 2018 13:25
Show Gist options
  • Save RobertoBarros/467bfccddac026d19b253e2b39d8a2ce to your computer and use it in GitHub Desktop.
Save RobertoBarros/467bfccddac026d19b253e2b39d8a2ce to your computer and use it in GitHub Desktop.
git: Reset local repository branch to be just like remote repository HEAD
git fetch origin
git reset --hard origin/master
# https://stackoverflow.com/questions/1628088/reset-local-repository-branch-to-be-just-like-remote-repository-head
# Remove untracked files:
git clean -f
# Undo merge with conflicts
git merge --abort
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment