Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds instructions for restoring a feature branch from a backup when rebasing goes wrong. #19

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions episodes/08-rebase.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,26 @@ goes wrong during the rebase:
$ git branch add_plot_script.backup
```

If at anytime you want to restore the branch
from your backup switch to the backup:

```bash
$ git switch add_plot_script.backup
```

Delete the branch where rebasing was attempted:

```bash
$ git branch -D add_plot_script
```

Re-create the original branch while still
on the backup branch:

```bash
$ git switch -c add_plot_script
```

:::

We will rebase interactively using the `-i` flag.
Expand Down