Skip to content

Instantly share code, notes, and snippets.

@oliworx
Last active February 1, 2018 10:58
Show Gist options
  • Save oliworx/c9614b167f148c8809af612dffcfb4d2 to your computer and use it in GitHub Desktop.
Save oliworx/c9614b167f148c8809af612dffcfb4d2 to your computer and use it in GitHub Desktop.
Git cheat sheet

Reset and sync local repository with remote branch

git fetch origin
git reset --hard origin/master
git clean -f -d

Your local branch is now an exact copy (commits and all) of the remote branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment