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
Commits
0f467433
Commit
0f467433
authored
8 years ago
by
Laurent Heirendt
Browse files
Options
Downloads
Patches
Plain Diff
Added content for branches slides
parent
809cd62a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
branches.md
+6
-5
6 additions, 5 deletions
branches.md
essential_commands.md
+1
-1
1 addition, 1 deletion
essential_commands.md
with
7 additions
and
6 deletions
branches.md
+
6
−
5
View file @
0f467433
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
Branch-off within the same repository in order to stay safe!
Branch-off within the same repository in order to stay safe!
The master branch:
The master branch:
<img
src=
"img/branch-
0-
master.png"
class=
"
as-is
"
/>
<img
src=
"img/branch-master.png"
class=
"
branch-master
"
/>
## One branch per feature
## One branch per feature
...
@@ -14,7 +14,7 @@ $ git checkout -b matrix_vect_mult_myName
...
@@ -14,7 +14,7 @@ $ git checkout -b matrix_vect_mult_myName
```
```
The
`-b`
flag creates the branch.
The
`-b`
flag creates the branch.
<img
src=
"img/branch-
1-checkout-b
.png"
class=
"
as-is
"
/>
<img
src=
"img/branch-
create
.png"
class=
"
branch-create
"
/>
## Switch between branches
## Switch between branches
...
@@ -40,22 +40,23 @@ You can switch back to master with
...
@@ -40,22 +40,23 @@ You can switch back to master with
$
git checkout master
$
git checkout master
```
```
<div
class=
"fragment"
>
<br>
<br>
You can use the 5 essential commands as before.
You can use the 5 essential commands as before.
Only difference: you are on your own branch.
Only difference: you are on your own branch.
<img
src=
"img/branch-commit.png"
class=
"branch-commit"
/>
## Merge a branch
## Merge a branch
If you want your feature on the
`develop`
or
`master`
branches, merge!
If you want your feature on the
`develop`
or
`master`
branches, merge!
<br>
**submit a MR or a PR**
via the Github/Gitlab interface.
**submit a MR or a PR**
via the Github/Gitlab interface.
<img
src=
"img/branch-merge.png"
class=
"branch-merge"
/>
<div
class=
"fragment"
>
<div
class=
"fragment"
>
<br>
**ADVANCED**
: You can see the differences between branches
**ADVANCED**
: You can see the differences between branches
```
sh
```
sh
$
git diff master..matrix_vect_mult_myName
$
git diff master..matrix_vect_mult_myName
...
...
This diff is collapsed.
Click to expand it.
essential_commands.md
+
1
−
1
View file @
0f467433
...
@@ -95,7 +95,7 @@ $ git pull
...
@@ -95,7 +95,7 @@ $ git pull
```
```
## Push your file to the
folder
## Push your file to the
repository
```
sh
```
sh
$
git push
$
git push
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment