- Default branch is master. - Multiple branches can exists in the same repository. - Pointers for all branches are located in .git/refs/heads folder. - Current branch track new commits. - Branch pointer moves automatically after every new commit. - hange branch git checkout <branch>
Now we will create a branch and below is the command to create it which has name staging:
[varelite1@managed1 repo]$ git branch staging
Now you can go ahead and switch to the branch and perform some tasks:
That has been pushed to remote. Now you can go ahead on managed to push the details. You need to remember that push will not fetch the branch. You need to run fetch command.