BigW Consortium Gitlab

create-branch.md 1.36 KB
Newer Older
1 2
# How to create a branch

karen Carias committed
3
A branch is an independent line of development.
4

karen Carias committed
5
New commits are recorded in the history for the current branch, which results in taking the source from someone’s repository (the place where the history of your work is stored) at certain point in time, and apply your own changes to it in the history of the project.
6

karen Carias committed
7
To add changes to your GitLab project, you should create a branch. You can do it in your [shell](basic-git-commands.md) or in GitLab.
8

karen Carias committed
9
To create a new branch in GitLab, sign in and then select a project on the right side of your screen:
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28

![Select a project](basicsimages/select_project.png)

Click on "commits" on the menu on the left side of your screen:

![Commits](basicsimages/commits.png)

Click on the "branches" tab:

![Branches](basicsimages/branches.png)

Click on the "new branch" button on the right side of the screen:

![New branch](basicsimages/newbranch.png)

Fill out the information required:

1. Add a name for your new branch (you can't add spaces, so you can use hyphens or underscores)

karen Carias committed
29
1. On the "create from" space, add the the name of the branch you want to branch off from
30 31 32 33 34

1. Click on the button "create branch"

![Branch info](basicsimages/branch_info.png)

karen Carias committed
35
### Note:
36

karen Carias committed
37
You will be able to find and select the name of your branch in the white box next to a project's name:
38 39

![Branch name](basicsimages/branch_name.png)