mirror of
https://gitlab.com/ric_harvey/git-guide.git
synced 2024-11-27 13:24:03 +00:00
add into to branches
This commit is contained in:
parent
fbf8bd293a
commit
772f9b90e2
1 changed files with 19 additions and 0 deletions
19
branches.md
19
branches.md
|
@ -1,5 +1,24 @@
|
||||||
# Working with Branches
|
# Working with Branches
|
||||||
|
|
||||||
|
Branches are a way of working on a copy of the code without interfering with the main repository and running into merge conflicts with other developers constantly. Other people can still commit to the main branch or merge in other features but you will be free from all those distractions and free to work on your feature or issue. Lets visualise this below where you make a new branch called **FeatureA**
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
gitGraph
|
||||||
|
commit
|
||||||
|
commit
|
||||||
|
branch develop
|
||||||
|
checkout develop
|
||||||
|
commit
|
||||||
|
commit
|
||||||
|
commit
|
||||||
|
checkout main
|
||||||
|
commit
|
||||||
|
commit
|
||||||
|
commit
|
||||||
|
```
|
||||||
|
|
||||||
|
As you can see several more commits have been made to the **main** branch whilst you've been working in the **FeatureA** branch. We'll talk more about **merging** these changes together later, but for now lets look at creating and managing branches.
|
||||||
|
|
||||||
## Creating a branch with Gitlab
|
## Creating a branch with Gitlab
|
||||||
|
|
||||||
In the Gitlab site when you open a project you'll have a little menu that pops up on the left hand side of the code like the image below.
|
In the Gitlab site when you open a project you'll have a little menu that pops up on the left hand side of the code like the image below.
|
||||||
|
|
Loading…
Reference in a new issue