Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
courses
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
R3
school
courses
Merge requests
!129
[release] Regular merge of develop
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
[release] Regular merge of develop
develop
into
master
Overview
0
Commits
34
Pipelines
1
Changes
4
Merged
cylon-x
requested to merge
develop
into
master
2 years ago
Overview
0
Commits
34
Pipelines
1
Changes
4
Expand
0
0
Merge request reports
Viewing commit
facb4065
Prev
Next
Show latest version
4 files
+
54
−
59
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
Verified
facb4065
changes to part 1
· facb4065
Laurent Heirendt
authored
2 years ago
2022/2022-05-31_git-trilogy-part-1/slides/branches.md
+
27
−
21
Options
# New term: <font color="color:red">branch</font>
*
A sequence of commits (changes) is referred to as
*
*branch*
*
.
*
A new branch can be created by
__
branching off
__
from a commit.
*
A
*
*branch*
*
can be understood as a named
*
*version*
*
of your repository.
*
A sequence of commits (changes) is referred to as
*branch*
.
*
A new branch can be created by
*
branching off
*
from a commit
on another branch
.
*
A
*branch*
can be understood as a named
*version*
of your repository.
<div
style=
"position:absolute;left:50%;top:1em"
>
<img
src=
"slides/img/branch_branch-off_detail.png"
class=
"as-is"
height=
"800px"
/>
@@ -14,7 +14,7 @@
Generally, in a repository, there are guidelines for contributing.
<
div
class=
"fragment"
>
<
br
>
A common development scheme is dual with a:
@@ -48,33 +48,39 @@ Best practice is to <font color="red">create a new **branch**!</font>
<img
src=
"slides/img/branch_my-branch.png"
height=
"800em"
/>
</div>
<br>
<br>
Using branches ensures:
*
your changes are made separately from other changes
*
your version w
on'
t be affected by others
*
all related changes are aggregated
o
n one place
*
your changes are made separately from other
(unrelated)
changes
*
your version w
ill no
t be affected by other
contributor
s
*
all related changes are aggregated
i
n one place
*
work can continue if the development of one feature gets stuck
<br>
Are you working on more features in parallel?
<font
color=
"red"
>
Create a new
**branch**
!
</font>
for each of them :)
<font
color=
"red"
>
Create a new
**branch**
!
</font>
for each of them!
# Quick recap
What is the difference between a
*fork*
and a
*branch*
?
# Time to practice!
<div
class=
"fragment"
>
<br><br><br>
<div
align=
"center"
>
<img
src=
"slides/img/forking_detail-with-branches.png"
height=
"500em"
/>
</div>
1.
What is the difference between
**fork**
and
**branch**
?
<div
class=
"fragment fade-in-then-out"
>
<div
style=
"position:absolute;left:10%;top:8em"
>
<img
src=
"slides/img/forking_detail-with-branches.png"
height=
"500em"
/>
</div>
2.
Why is best practice to branch off from
`develop`
?
3.
Switch between branches
<div
class=
"fragment fade-in-then-out"
>
<div
style=
"position:absolute;left:10%;top:8em"
>
<img
src=
"slides/img/branch_GUI_switch.png"
height=
"500em"
/>
</div>
# How to switch between branches?
<div
style=
"position:absolute;left:10%;top:8em"
>
<img
src=
"slides/img/branch_GUI_switch.png"
height=
"500em"
/>
</div>
Why is best practice to branch off from
`develop`
?
\ No newline at end of file
Loading