Fixing Your Master Branch

September 26, 2017

You commited a change to master to it is now ahead of orign/master by 1 commit. You realize that you want this commit on a branch so you create a new branch branch.

Now your branch and master are the same but you want master to go back to being in sync with origin/master

$ git checkout -B master origin/master
  • https://superuser.com/questions/273172/how-do-i-reset-master-to-origin-master

Tags: git