Git commands for branches
You can use Git to create, manage, and delete branches in the clone of the source repository you have on your computer (your local repo) or in your Dev Environments, and then commit and push your changes to your CodeCatalyst source repository (the remote repository). For example:
Lists all branches in the local repo with an asterisk
( |
|
Pulls information about all existing branches in the remote repository to the local repo. |
|
Lists all branches in the local repo and remote tracking branches in the local repo. |
|
Lists only remote tracking branches in the local repo. |
|
Creates a branch in the local repo using the specified branch name. This branch will not appear in the remote repository until you commit and push the change. |
|
Creates a branch in the local repo using the specified branch name, and then switches to it. |
|
Switches to another branch in the local repo using the specified branch name. |
|
Pushes a branch from the local repo to the remote repository using the local repo's specified nickname for the remote repository and the specified branch name. Also sets up upstream tracking information for the branch in the local repo. |
|
Merges changes from another branch in the local repo to the current branch in the local repo. |
|
Deletes a branch in the local repo unless it contains work that has not been merged. |
|
Deletes a branch in the remote repository using the specified nickname
the local repo has for the remote repository and the specified branch
name. (Note the use of the colon ( |
|
For more information, see your Git documentation.