Add entry for safe rebasing of unpushed commits

This commit is contained in:
Joe Block 2014-07-30 14:57:27 -07:00
parent af732704df
commit f160a96ef6
1 changed files with 12 additions and 0 deletions

View File

@ -112,6 +112,18 @@ If everything is successful, you should see something like this:
(master)$ Successfully rebased and updated refs/heads/master.
```
<a name="rebase-unpushed-commits"></a>
#### I want to combine only unpushed commits
Sometimes you have several work in progress commits that you want to combine before you push them upstream. You don't want to accidentally combine any commits that have already been pushed upstream because someone else may have already made commits that reference them.
```
(master)$ git rebase -i @{u}
```
This will do an interactive rebase that lists only the commits that you haven't already pushed, so it will be safe to reorder/fix/squash anything in the list.
### Possible issues with interactive rebases
<a name="noop"></a>