jhconning
1/6/2016 - 9:24 PM

git: overwrite local repo

Ways to overwrite local git repo

#The dramatic way
git fetch --all
git reset --hard origin/master


#THE WAY THAT KEEPS anything local first do a commit of your changes

git add *
git commit -a -m "auto dev server commit"

#then fetch the changes and overwrite if there is a conflict

git fetch origin master
git merge -s recursive -X theirs origin/master