Skip to content

Instantly share code, notes, and snippets.

@aamishbaloch
Created July 24, 2017 07:05
Show Gist options
  • Save aamishbaloch/1217fb23ac237469b1bb02cb99e3e2d3 to your computer and use it in GitHub Desktop.
Save aamishbaloch/1217fb23ac237469b1bb02cb99e3e2d3 to your computer and use it in GitHub Desktop.
Getting the code as it is from the remote

Getting the code as it is from the remote

Ideal way to do this is to not use pull at all, but instead fetch and reset. You can see in the example below:

git fetch origin master
git reset --hard FETCH_HEAD
git clean -df
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment