# How to replace local branch completely with remote branch in git

git checkout master
git reset --hard origin/master


# How to replace remote branch completely with local branch in git

git push --force origin master