Git pull not pulling everything

If you always want your server version to reflect a commit from your repo, it’s probably better to use git reset instead of git pull – that way you never invoke merge functionality, but instead set all of the files to exactly what they are in the commit you reset to. For example:

git fetch origin master
git reset --hard FETCH_HEAD

Leave a Comment