Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| git_rebase [2019/04/03 20:38] – [Example requiring ''%%--%%onto newbase''] rpjday | git_rebase [2019/04/06 21:34] (current) – [Removing a sequence of commits] rpjday | ||
|---|---|---|---|
| Line 35: | Line 35: | ||
| D---E---F---G | D---E---F---G | ||
| </ | </ | ||
| + | |||
| + | One of: | ||
| + | |||
| + | < | ||
| + | $ git checkout topic | ||
| + | $ git rebase master | ||
| + | </ | ||
| + | |||
| + | or: | ||
| < | < | ||
| Line 55: | Line 64: | ||
| o---o---o | o---o---o | ||
| </ | </ | ||
| - | ===== DESCRIPTION ===== | ||
| < | < | ||
| - | If < | + | $ git rebase |
| - | git checkout < | + | |
| - | remains on the current branch. | + | |
| </ | </ | ||
| - | |||
| - | In other words, the final optional argument '' | ||
| < | < | ||
| - | $ git checkout < | + | o---o---o |
| + | / | ||
| + | o---o---o---o---o | ||
| + | \ | ||
| + | o---o---o---o---o | ||
| </ | </ | ||
| - | then just pretend it says '' | ||
| - | ===== Examples ===== | ||
| ==== Removing a sequence of commits ===== | ==== Removing a sequence of commits ===== | ||
| Line 84: | Line 90: | ||
| < | < | ||
| - | $ git rebase --onto B D | + | $ git rebase --onto B D [HEAD] |
| </ | </ | ||