How to force pull and overwrite local files in git
1 min read
- First, update all origin/branch refs to latest:
git fetch --all
- Backup your current branch (e.g. master):
git branch backup-master
- Jump to the latest commit on origin/branch and checkout those files:
git reset --hard origin/master
References: stackoverflow