How do i create a git branch?



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

    From time to time you want to work off an other branch for certain things like new features.

    To create new branch called dev, and view all branches, it also list the remote branches on github

    $ git branch dev
    $ git branch -a
      dev
    * master
      remotes/origin/master
    

    To to the branch you just created by doing this:

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

    That * show which branch you are on.


Log in to reply
 

© Lightnetics 2024