[git] Make the current Git branch a master branch

I don't have enough karma to comment.

I know this is not what OP wanted, but you can do this if you know you are going to have a problem similar to OP in the future.

Suppose, you know in advance that you want to create a branch which will have new awesome features and you also want that branch to be the master in the future and at the same time don't want to loose the current master branch (which will get lost if you initially make a separate branch and awesome features to it and then merge it to master). If this feels confusing, see the below diagram of the 'bad' situation.

bad situation

To solve this( i.e. to stop the loss of boring) do the following Basically,

  1. Create a copy of your current master by doing git branch boring Replace boring with whatever name you want to keep
  2. Now you can add new awesome features to your master branch and add boring features to the boring branch.
  3. You can still keep updating the boring branch and maybe use it with the intention of never merging it to master. You will not loose the boring features.
  4. Your master branch will have awesome features.

Good situation