How do i create a git branch and move to it?



  • git man page: http://bit.ly/2nvGNWB

    It's not called "move to it", but essentially that's what you're doing. It's called checkout, checking out a branch. So this command create a branch first and then checks out a branch.

    $ git checkout -b new_dev
    Switched to a new branch 'new_dev'
    $ git branch -a
      dev
      master
    * new_dev
      remotes/origin/master
    

    You are currently on the new_dev branch


Log in to reply
 

© Lightnetics 2024