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

changes to part 1

parent 58aa2f27
No related branches found
No related tags found
2 merge requests!129[release] Regular merge of develop,!126Changes for git part 1
# 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 won't be affected by others
* all related changes are aggregated on one place
* your changes are made separately from other (unrelated) changes
* your version will not be affected by other contributors
* all related changes are aggregated in 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
......@@ -24,9 +24,10 @@ Gitlab:
# New term: <font color="color:red">commit</font>
## Time to practice!
1. Notice last commit on files
<img src="slides/img/icon-live-demo.png" height="100px">
1. Notice last commits that modified files/folders
<!-- .element: class="fragment" data-fragment-index="1" -->
1. Review history of your repository
<!-- .element: class="fragment" data-fragment-index="2" -->
......@@ -46,9 +47,5 @@ Gitlab:
<img src="slides/img/commit_GUI_click-on-commit.png" class="as-is" height="75px"/>
</div>
<div class="fragment fade-in-then-out" data-fragment-index="3">
<img src="slides/img/commit_changes.png" class="as-is" width="80%"/>
<img src="slides/img/commit_changes.png" class="as-is" width="90%"/>
</div>
Notes:
Congrats! Now you have reviewed recent changes in your repository!
\ No newline at end of file
# New term: <font color="color:red">merge</font>
* You have made changes on your branch
* Now you want your changes to be reflected on another branch </br>(most probably `develop` or `master`)
* Now you want your changes to be reflected on another branch </br>(most probably `develop`)
<div style="position:absolute;left:60%;top:1em">
<div style="position:absolute;left:70%;top:1em">
<img src="slides/img/branch_merge-detail.png" height="800px" >
</div>
You have to <font color="color:red">merge</font> the branches.
**Remarks**: merging is directional - *Merge branch A to branch B*
- Merging is directional - *Merge branch A to branch B*
- Merging of branches is a process that is initiated via a so called **merge request** (MR):
- Your peers can comment on your changes in a merge request **review**!
### The merge is initiated via so called **merge request**
* *Requesting* someone (from the original repository) to *merge* your changes.
* *merge request* is commonly abreviated as **MR**
Your peers can comment on your changes in a merge request **review**!
# What happened in the background?
# Our state at the moment?
<div style="position:absolute;top:2em" >
<div style="position:absolute;top:2em" class="fragment fade-in-then-out" data-fragment-index="1">
<img src="slides/img/fork_branch-diagram-after-commit.png" height="600px" >
</div>
<div style="position:absolute;top:2em" class="fragment fade-in-then-out" data-fragment-index="1">
<img src="slides/img/fork_branch-diagram-after-commit-with-back-arrow.png" height="600px" >
</div>
......
# Time to practice!
# Workflow - Web IDE
To change content of a file:
* Browse to *your fork*
* Open Web IDE
<!-- .element: class="fragment" data-fragment-index="1" -->
* Select a branch you want to work on
* Select the development branch
<!-- .element: class="fragment" data-fragment-index="2" -->
* Edit file content
<!-- .element: class="fragment" data-fragment-index="3" -->
* Commit
<!-- .element: class="fragment" data-fragment-index="4" -->
* Hit Commit
* Select **Create a new branch** and type your branch name
* Leave the **Start a new merge request** checked
* Hit Commit
* Click Commit
* Select **Create a new branch**
* Type your branch name (optional, but recommended)
* Check **Start a new merge request**
* Click Commit
<div style="position:absolute;left:40%;top:1em" class="fragment fade-in-then-out" data-fragment-index="1">
<img src="slides/img/commit_GUI_web-ide.png" height="600px" >
<div style="position:absolute;left:30%;top:1em" class="fragment fade-in-then-out" data-fragment-index="1">
<img src="slides/img/commit_GUI_web-ide.png" width="90%" >
</div>
<div style="position:absolute;left:40%;top:1em" class="fragment fade-in-then-out" data-fragment-index="2">
<img src="slides/img/web-ide_select-branch.png" height="600px" >
<img src="slides/img/web-ide_select-branch.png" width="90%" >
</div>
<div style="position:absolute;left:33%;top:1em" class="fragment fade-in-then-out" data-fragment-index="3">
<img src="slides/img/web-ide_edit-file.png" height="400px" >
<img src="slides/img/web-ide_edit-file.png" width="90%" >
</div>
<div style="position:absolute;left:50%;top:1em" class="fragment fade-in-then-out" data-fragment-index="4">
<img src="slides/img/web-ide_commit-button.png" height="200px" >
<img src="slides/img/web-ide_commit-button.png" width="90%" >
</div>
<div style="position:absolute;left:50%;top:10em" class="fragment fade-in-then-out" data-fragment-index="4">
<img src="slides/img/web-ide_commit-detail.png" height="400px" >
</div>
# What have we done?
<div style="position:absolute;top:2em" class="fragment fade-in-then-out" data-fragment-index="1">
<img src="slides/img/fork_branch-diagram-after-commit.png" height="600px" >
<img src="slides/img/web-ide_commit-detail.png" width="90%" >
</div>
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