Commit 1b936e8c authored by Mroik's avatar Mroik
Browse files

Add changes to the slides for the 2022 edition

parent 8681848f
......@@ -2,9 +2,9 @@
### What we'll talk about:
* Using git repos in a git repo: **submodule**
* Moving a branch 'ahead': **rebase**
* Extracting commits from other branches: **cherry-pick**
* Storing changes for later use: **stash**
* Moving a branch 'ahead': **rebase**
* Finding out who made a mistake: **blame**
----
......@@ -25,14 +25,6 @@
## Submodule: What can it do?
A submodule will appear as a subdirectory of our own repository. <!-- .element: class="fragment" -->
Cloning a repository that contains a submodule will not clone it. <!-- .element: class="fragment" -->
---
## Submodule: What can it do?
Once created the sumodule will point always to the same commit. <!-- .element: class="fragment" -->
Every edit we make inside our submodule will not be pushed upstream. <!-- .element: class="fragment" -->
......@@ -55,50 +47,6 @@ git submodule update --init --recursive submodule_directory
----
# Moving changes
## Cherry Pick and Stash
![](assets/one-simply-cherry-pick.jpg)
---
## Git Cherry Pick: When do I need it?
<div>
<!-- .element: class="fragment" -->
I need it when I want to import a **single** commit or **a range** of commits from another branch.
</div>
---
## Git Cherry Pick: What can it do?
<div>
<!-- .element: class="fragment" -->
Using **cherry pick**, git will perform a "rebase" (we will see later).
</div>
<div>
<!-- .element: class="fragment" -->
**N.B.** We still need to resolve any conflicts (if needed).
</div>
---
## Git Cherry Pick: Syntax
#### Take a single commit and apply on current branch
```bash
git cherry-pick <commit hash> # single commit form
git cherry-pick <hash start>..<hash end> # commit range form
```
----
## Git Stash
---
......@@ -190,6 +138,51 @@ git rebase <branch A name>
----
# Moving changes
## Cherry Pick and Stash
![](assets/one-simply-cherry-pick.jpg)
---
## Git Cherry Pick: When do I need it?
<div>
<!-- .element: class="fragment" -->
I need it when I want to import a **single** commit or **a range** of commits from another branch.
</div>
---
## Git Cherry Pick: What can it do?
<div>
<!-- .element: class="fragment" -->
Using **cherry pick**, git will perform a "rebase" (we will see later).
</div>
<div>
<!-- .element: class="fragment" -->
**N.B.** We still need to resolve any conflicts (if needed).
</div>
---
## Git Cherry Pick: Syntax
#### Take a single commit and apply on current branch
```bash
git cherry-pick <commit hash> # single commit form
git cherry-pick <hash start>..<hash end> # commit range form
```
----
# Who did this?!
## Blame
......@@ -235,6 +228,16 @@ What should I use to find a bug if I don't know which lines caused it? <!-- .ele
----
## What does it do?
Does a binary search to find the commit that introduced a bug by flagging a
starting bad commit and a known good commit
To start use **git bisect start**.
Flag a good commit with **git bisect good** and a bad one with **git bisect bad**
----
## Disaster Recovery
### What we'll talk about:
......@@ -365,6 +368,7 @@ the ones that are unreachable and the intermediate commits of a rebase
- [__Emanuele Santoro__](http://santoro.tk)
- __Luca Fusé__
- __Giacomo Vercesi__
For their fantastic slides on advanced git topics of the previous years
<section class="intro">
<h1>Advanced Git & Disaster Recovery</h1>
<h1>Advanced Git</h1>
<h2>Stuff you probably don't need</h2>
<h3>We're gonna explain it anyway</h3>
<img src="./poul/img/logo-text-white.svg"/>
<p>Giacomo Vercesi &lt;1vercesig@gmail.com&gt;</p>
<p>Mirko &lt;mroik@poul.org&gt;<br>
frigobar &lt;frigobar@poul.org&gt;<br>
Vechapw &lt;vechapw@poul.org&gt;</p>
</section>
......@@ -7,5 +7,7 @@
<img class="cc" src="./poul/img/creativecommons-by-nc-sa.svg"/>
<p>Giacomo Vercesi &lt;1vercesig@gmail.com&gt;</p>
<p>Mirko &lt;mroik@poul.org&gt;<br>
frigobar &lt;frigobar@poul.org&gt;<br>
Vechapw &lt;vechapw@poul.org&gt;</p>
</section>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment