Mar 14 2018

How to update an outdated local Git repo

When your local repository is behind/untracked this will:

  • delete all local files that are no longer present in the remote repo
  • replace all local files that have newer versions in the remote repo
git reset --hard HEAD
git clean -f -d
git pull