Answers for "switch branch to master"

1

how to switch to a master which is already added

git checkout master
Posted by: Guest on August-19-2020
1

how to make new branch and switch in git

git checkout -b myNewBranch
Posted by: Guest on April-25-2021
0

git change master branch

## 1) Rename master branch to oldmaster.
git branch -m master oldmaster
#Now there is no master branch on my local machine.

## 2) Rename my masterTemp branch to master
git branch -m masterTemp master
#The branch which was named masterTemp on my local machine is now master

## 3) Delete the branch from remote
git branch -rD master

## 4) Push the new master branch to remote
git push --force origin master
Posted by: Guest on April-18-2021

Code answers related to "switch branch to master"

Browse Popular Code Answers by Language