Skip to content
Snippets Groups Projects
Commit 0f467433 authored by Laurent Heirendt's avatar Laurent Heirendt :airplane:
Browse files

Added content for branches slides

parent 809cd62a
No related branches found
No related tags found
No related merge requests found
...@@ -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
......
...@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment