Commit 9df30481 authored by French, Robert's avatar French, Robert
Browse files

Add rebasing slides for posterity

parent 71732d75
<!-- $theme: gaia -->
<!-- *template: invert -->
<!-- *template: gaia -->
<!-- $size: 16:9 -->
# Rebasing
### Git It Together
......@@ -33,67 +34,69 @@
---
### A new feature based on old work
```
C (master)
| E (new-feature)
| |
B D
| /
A
[original]
```plain
C (master)
| E (new-feature)
| |
B D
| /
A
[original]
```
---
### Rebase that feature onto current work
```plain
E' (new-feature)
|
D'
C (master) /
| E (new-feature) C (master)
| | ====> |
B D B
| / |
A A
[original] [rebase]
```
by moving the "base" of a branch to a different commit
```
E' (new-feature)
|
D'
C (master) /
| E (new-feature) C (master)
| | ====> |
B D B
| / |
A A
[original] [rebase]
```
---
### Rebase + Squash
```
E' (new-feature)
|
D' E'' (new-feature)
C (master) / /
| E (new-feature) C (master) C (master)
| | ====> | ====> |
B D B B
| / | |
A A A
[original] [rebase] [squash]
```plain
E' (new-feature)
|
D' E'' (new-feature)
C (master) / /
| E (new-feature) C (master) C (master)
| | ====> | ====> |
B D B B
| / | |
A A A
[original] [rebase] [squash]
```
Now all of our work is bundled in a single commit
---
### Rebase + Squash + Merge
```
E' (new-feature)
|
D' E'' (new-feature) E'' (master)
C (master) / / |
| E (new-feature) C (master) C (master) C
| | ====> | ====> | ====> |
B D B B B
| / | | |
A A A A
[original] [rebase] [squash] [merge]
```plain
E' (new-feature)
|
D' E'' (new-feature) E'' (master)
C (master) / / |
| E (new-feature) C (master) C (master) C
| | ====> | ====> | ====> |
B D B B B
| / | | |
A A A A
[original] [rebase] [squash] [merge]
```
Now we have successfully integrated our new feature into `master`.
......
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