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

renaming files

parent bf04f7f8
No related branches found
No related tags found
Loading
......@@ -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" },
......
# 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
......
# 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
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