Answers for "switch from master to branch git"

0

How to switch from master to main git branch

git checkout master        # to be sure you are on master branch
git push origin HEAD:main  # and then push the current branch (as master) to main
-or-
git push --force origin HEAD:main
Posted by: Guest on June-09-2021
16

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(+)
Posted by: Guest on April-30-2020
0

git switch branch to another branch

git checkout <name>
Posted by: Guest on August-23-2020
0

git move change from master to new branch

git stash						//you can stash the changes in the master branch .
git checkout -b newbranchname	//then checkout the branch
git stash pop					//and pop the changes here
Posted by: Guest on November-22-2021

Code answers related to "switch from master to branch git"

Browse Popular Code Answers by Language