Replace master branch with another branch Git

Should you need to replace your master branch entirely with another branch you can issue the following commands:

git checkout YOUR_BRANCH_NAME

git merge -s ours master

git checkout master

git merge YOUR_BRANCH_NAME

Thanks to Ergosys