Sunday, December 30, 2012

Force overwrite on git pull

How do I force an overwrite of local files on a git pull?


git fetch --all
git reset --hard origin/master
git fetch downloads the latest from remote without trying to merge or rebase anything. 
Then thegit reset resets the master branch to what you just fetched

No comments:

Post a Comment