Monday, June 24, 2019

How To Switch Branch In Git

Switch branches 


Now lets create two branch "mybranch1" and "mybranch2"

$ git branch  mybranch1
$ git branch mybranch2
Now check all branch

* mybranch1
  mybranch2
  master
Use the git checkout command to switch branch.

$ git checkout 
Switch to the branch "mybranch1" by the following command.

$ git checkout mybranch1
Switched to branch 'mybranch1'


Related Tutorial

No comments:

Post a Comment