git switch to master branch code example
Example 1: how to switch to a master which is already added
git checkout master
Example 2: git switch branch
git switch <branch_name>
git checkout <branch_name>
Example 3: sitch a branch command line
$ git checkout <existing_branch>
$ git checkout -b <new_branch>
Example 4: git switch branch
git switch branch_name
git checkout branch_name
Example 5: git merge branch to master
$ git checkout master
Switched to branch 'master'
$ git merge iss53
Merge made by the 'recursive' strategy.
index.html | 1 +
1 file changed, 1 insertion(+)
Example 6: git change master branch
git branch -m master oldmaster
git branch -m masterTemp master
git branch -rD master
git push --force origin master