diff --git a/2019/2019-09-24_advancedGitTraining/slides/amendIntro.md b/2019/2019-09-24_advancedGitTraining/slides/amend.md similarity index 100% rename from 2019/2019-09-24_advancedGitTraining/slides/amendIntro.md rename to 2019/2019-09-24_advancedGitTraining/slides/amend.md diff --git a/2019/2019-09-24_advancedGitTraining/slides/chPickIntro.md b/2019/2019-09-24_advancedGitTraining/slides/chPick.md similarity index 100% rename from 2019/2019-09-24_advancedGitTraining/slides/chPickIntro.md rename to 2019/2019-09-24_advancedGitTraining/slides/chPick.md diff --git a/2019/2019-09-24_advancedGitTraining/slides/conflictIntro.md b/2019/2019-09-24_advancedGitTraining/slides/conflict.md similarity index 100% rename from 2019/2019-09-24_advancedGitTraining/slides/conflictIntro.md rename to 2019/2019-09-24_advancedGitTraining/slides/conflict.md diff --git a/2019/2019-09-24_advancedGitTraining/slides/list.json b/2019/2019-09-24_advancedGitTraining/slides/list.json index 455728cd669220003be2ad4ec550569af237f385..126c9b18661ab81e53b38c8f8b301cb48776666d 100644 --- a/2019/2019-09-24_advancedGitTraining/slides/list.json +++ b/2019/2019-09-24_advancedGitTraining/slides/list.json @@ -2,7 +2,6 @@ { "filename": "index.md" }, { "filename": "overview.md" }, { "filename": "gettingStarted.md" }, - { "filename": "rebaseIntro.md" }, { "filename": "rebase.md" }, { "filename": "chPickIntro.md" }, { "filename": "revertIntro.md" }, diff --git a/2019/2019-09-24_advancedGitTraining/slides/mergeIntro.md b/2019/2019-09-24_advancedGitTraining/slides/merge.md similarity index 100% rename from 2019/2019-09-24_advancedGitTraining/slides/mergeIntro.md rename to 2019/2019-09-24_advancedGitTraining/slides/merge.md diff --git a/2019/2019-09-24_advancedGitTraining/slides/rebase.md b/2019/2019-09-24_advancedGitTraining/slides/rebase.md index a1e5efd88db979421f11acb1bac210af546feb60..faa0439057e081dbaf2b39001268422a8638e4ee 100644 --- a/2019/2019-09-24_advancedGitTraining/slides/rebase.md +++ b/2019/2019-09-24_advancedGitTraining/slides/rebase.md @@ -1,3 +1,63 @@ +# Theory: Git Rebasing + +* Git rebase enables to keep up with changes made to a branch +* Straightens the workflow +* Avoid discrepancies when multiple people work on the same project + +Imagine the following situation: +<div style="top: 10em; left: 30%; position: absolute;"> + <img src="slides/img/beforeRebase.png" height="400px"> +</div> + + + +# Theory: Git Rebasing + +* Develop branch is several commits ahead of master. +* Commits implemented into master that aren't in develop. + +<div style="top: 10em; left: 30%; position: absolute;"> + <img src="slides/img/afterRebase.png" height="400px"> +</div> + + + +# Practical: Git Rebasing + +* Create a file in your branch +```bash +$ git checkout myBranch +$ echo "# message" > yourName.md +``` + +* Then create a file in the develop branch +```bash +$ git checkout develop +$ touch startRebase.txt +``` + +* Check the histories of both branches +```bash +$ git log +``` + + + +# Practical: Git Rebasing + +* rebase the develop branch onto your branch +```bash +$ git checkout myBranch +$ git rebase develop +``` + +* check the history of your branch again +```bash +$ git log +``` + + + # Theory: Git Interactive Rebasing ```bash diff --git a/2019/2019-09-24_advancedGitTraining/slides/rebaseIntro.md b/2019/2019-09-24_advancedGitTraining/slides/rebaseIntro.md deleted file mode 100644 index 4ff004ebb057f032163e391218a9e17eeee48da1..0000000000000000000000000000000000000000 --- a/2019/2019-09-24_advancedGitTraining/slides/rebaseIntro.md +++ /dev/null @@ -1,57 +0,0 @@ -# Theory: Git Rebasing - -* Git rebase enables to keep up with changes made to a branch -* Straightens the workflow -* Avoid discrepancies when multiple people work on the same project - -Imagine the following situation: -<div style="top: 10em; left: 30%; position: absolute;"> - <img src="slides/img/beforeRebase.png" height="400px"> -</div> - - - -# Theory: Git Rebasing - -* Develop branch is several commits ahead of master. -* Commits implemented into master that aren't in develop. - -<div style="top: 10em; left: 30%; position: absolute;"> - <img src="slides/img/afterRebase.png" height="400px"> -</div> - - - -# Practical: Git Rebasing - -* Create a file in your branch -```bash -$ git checkout myBranch -$ echo "# message" > yourName.md -``` - -* Then create a file in the develop branch -```bash -$ git checkout develop -$ touch startRebase.txt -``` - -* Check the histories of both branches -```bash -$ git log -``` - - - -# Practical: Git Rebasing - -* rebase the develop branch onto your branch -```bash -$ git checkout myBranch -$ git rebase develop -``` - -* check the history of your branch again -```bash -$ git log -``` \ No newline at end of file diff --git a/2019/2019-09-24_advancedGitTraining/slides/resetIntro.md b/2019/2019-09-24_advancedGitTraining/slides/reset.md similarity index 100% rename from 2019/2019-09-24_advancedGitTraining/slides/resetIntro.md rename to 2019/2019-09-24_advancedGitTraining/slides/reset.md diff --git a/2019/2019-09-24_advancedGitTraining/slides/revertIntro.md b/2019/2019-09-24_advancedGitTraining/slides/revert.md similarity index 100% rename from 2019/2019-09-24_advancedGitTraining/slides/revertIntro.md rename to 2019/2019-09-24_advancedGitTraining/slides/revert.md