If you have a sub-branch e.g. master-v2
that has way too many changes and diverged from the master
branch then in order to force the changes to master branch we use the following.
git fetch
git checkout master
git reset --hard origin/[sub-branch name]
git push origin master -f