Pull a git repo and overwrite your local master entirely

Oct 25, 2012 16:17 · 23 words · 1 minute read git

Pull and overwrite local master:

$ git fetch
$ git branch old-master 
$ git reset --hard origin/master
$ git merge -s ours old-master