Skip to content

Instantly share code, notes, and snippets.

@nasirkhan
Last active May 12, 2022 03:17
Show Gist options
  • Star 42 You must be signed in to star a gist
  • Fork 9 You must be signed in to fork a gist
  • Save nasirkhan/5950948 to your computer and use it in GitHub Desktop.
Save nasirkhan/5950948 to your computer and use it in GitHub Desktop.
`git` discard all local changes/commits and pull from upstream

git discard all local changes/commits and pull from upstream

git reset --hard origin/master

git pull origin master

@VitorAugusto
Copy link

lol this one has saved my life and my job, tnx.

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