Sometimes in the development we always commit into the master but at the end we want to make our branch source become master.
I feel this is easier way to do it.
git branch -m master abandonmaster //Move the master to Branch abandonmaster
git branch -m branchName master //Move the branchName to master
git push origin master //push master to remote
git push origin abandonmaster //pust abandonmaster branch to remote