1 |
On Fri, 6 Dec 2019 12:58:47 -0500 |
2 |
Michael Orlitzky <mjo@g.o> wrote: |
3 |
|
4 |
> $ git rebase -i <hash-of-commit-before-that> |
5 |
> |
6 |
> to do a rebase starting at the one you'd like to fix. |
7 |
|
8 |
|
9 |
Or, if you know the hash of the faulty commit, you can do: |
10 |
|
11 |
$ git rebase -i DEADBEEF^1 |
12 |
|
13 |
( 1st parent of commit DEADBEEF ) |
14 |
|
15 |
Which absolves you from needing to determine the parent commit manually. |
16 |
|
17 |
I believe |
18 |
|
19 |
$ git rebase -i DEADBEEF~24 |
20 |
|
21 |
Is also valid for "24th ancestor of commit DEADBEEF" |