


Hence we forcefully pushed out new master branch to remote. Git push –force origin masterĪnd its done.We had to perform step 3 and 4 because git does not allows us to delete master branch from remote. The branch which was named masterTemp on my local machine is now master Following are the steps to Sync your fork with the master: Step 1: Open your command line or terminal in git bash. It will show your current branch name with an asterisk () next the name. Now there is no master branch on my local machine.Ģ) Renamed my masterTemp branch to master And we cherry-picked all stable changes to masterTemp branch.So we landed in a situation where we wanted masterTemp branch as master branch.And Here is how we did it.

And unfortunately one of the branches merged was created from an unstable branch. Go to your local project and check out the branch you want to merge into (your local master branch) git checkout master Fetch the remote, bringing the branches and their commits from the remote repository.
#UPDATE THE MASTER FROM THE MASTER GIT UPDATE#
Several of branches were merged to master branch. checkout b temp makes a new branch from current detached HEAD branch f master temp update master to point to the newWhile working on Git with a big team, there are chances that a situation might arise when you want to set some other branch as master branch.Recently we were in a same situation.
