[21:59 lordaro@Donald coding] > git init git-test
Initialized empty Git repository in /home/lordaro/coding/git-test/.git/
[21:59 lordaro@Donald coding] > cd git-test/
[21:59 lordaro@Donald git-test] > ls
[21:59 lordaro@Donald git-test] > vim file
[22:00 lordaro@Donald git-test] > git add file
[22:00 lordaro@Donald git-test] > git commit -m "init"
[master (root-commit) 4ebeefd] init
1 file changed, 1 insertion(+)
create mode 100644 file
[22:00 lordaro@Donald git-test] > git checkout -b n1
Switched to a new branch 'n1'
[22:06 lordaro@Donald git-test] > vim file
[22:06 lordaro@Donald git-test] > git add -u
[22:06 lordaro@Donald git-test] > git cim "x1"
[n1 144b75a] x1
1 file changed, 1 insertion(+), 1 deletion(-)
[22:07 lordaro@Donald git-test] > vim file
[22:07 lordaro@Donald git-test] > git cam "x2"
[n1 020d1aa] x2
1 file changed, 1 insertion(+), 1 deletion(-)
[22:07 lordaro@Donald git-test] > git checkout -b n2
Switched to a new branch 'n2'
[22:07 lordaro@Donald git-test] > vim file
[22:07 lordaro@Donald git-test] > git cam "x3"
[n2 3864bf0] x3
1 file changed, 1 insertion(+), 1 deletion(-)
[22:08 lordaro@Donald git-test] > vim file
[22:08 lordaro@Donald git-test] > git cam "x4"
[n2 6d8a031] x4
1 file changed, 1 insertion(+), 1 deletion(-)
[22:08 lordaro@Donald git-test] > # oh noes, a review, we need a new commit before x1
[22:08 lordaro@Donald git-test] > git co n1
Switched to branch 'n1'
[22:08 lordaro@Donald git-test] > git co n2
Switched to branch 'n2'
[22:10 lordaro@Donald git-test] > git lg -5
* 6d8a031 - (HEAD -> n2) x4 (2 minutes ago)<Charles Pigott>
* 3864bf0 - x3 (2 minutes ago)<Charles Pigott>
* 020d1aa - (n1) x2 (3 minutes ago)<Charles Pigott>
* 144b75a - x1 (4 minutes ago)<Charles Pigott>
* 4ebeefd - (master) init (11 minutes ago)<Charles Pigott>
[22:10 lordaro@Donald git-test] > git co n1
Switched to branch 'n1'
[22:10 lordaro@Donald git-test] > git lg -5
* 020d1aa - (HEAD -> n1) x2 (3 minutes ago)<Charles Pigott>
* 144b75a - x1 (4 minutes ago)<Charles Pigott>
* 4ebeefd - (master) init (11 minutes ago)<Charles Pigott>
[22:11 lordaro@Donald git-test] > vim file
[22:20 lordaro@Donald git-test] > git cam "y1"
[n1 a539601] y1
1 file changed, 1 insertion(+), 1 deletion(-)
[22:20 lordaro@Donald git-test] > git rebase -i master # reorder commits
error: could not apply a539601... y1
When you have resolved this problem, run "git rebase --continue".
If you prefer to skip this patch, run "git rebase --skip" instead.
To check out the original branch and stop rebasing, run "git rebase --abort".
Could not apply a539601df7356a15586c8ec6c752d5c2ae944cad... y1
[22:20 lordaro@Donald git-test] > vim file
[22:20 lordaro@Donald git-test] > git add -u
[22:20 lordaro@Donald git-test] > git rebase --continue
[detached HEAD ee36328] y1
1 file changed, 1 insertion(+), 1 deletion(-)
error: could not apply 144b75a... x1
When you have resolved this problem, run "git rebase --continue".
If you prefer to skip this patch, run "git rebase --skip" instead.
To check out the original branch and stop rebasing, run "git rebase --abort".
Could not apply 144b75a40abf59482fda5019f9f5c2c8201b0a3a... x1
[22:21 lordaro@Donald git-test] > vim file
[22:21 lordaro@Donald git-test] > git add -u
[22:21 lordaro@Donald git-test] > git rebase --continue
[detached HEAD 3533c6a] x1
1 file changed, 1 insertion(+), 1 deletion(-)
Successfully rebased and updated refs/heads/n1.
[22:21 lordaro@Donald git-test] > git lg -5
* b17aa11 - (HEAD -> n1) x2 (5 seconds ago)<Charles Pigott>
* 3533c6a - x1 (6 seconds ago)<Charles Pigott>
* ee36328 - y1 (22 seconds ago)<Charles Pigott>
* 4ebeefd - (master) init (21 minutes ago)<Charles Pigott>
[22:21 lordaro@Donald git-test] > git checkout n2
Switched to branch 'n2'
[22:21 lordaro@Donald git-test] > git lg -5
* 6d8a031 - (HEAD -> n2) x4 (13 minutes ago)<Charles Pigott>
* 3864bf0 - x3 (13 minutes ago)<Charles Pigott>
* 020d1aa - x2 (14 minutes ago)<Charles Pigott>
* 144b75a - x1 (14 minutes ago)<Charles Pigott>
* 4ebeefd - (master) init (21 minutes ago)<Charles Pigott>
[22:21 lordaro@Donald git-test] > # ^ note the hashes - these are the "old" commits from before
[22:22 lordaro@Donald git-test] > # n1 was rebased (and rewritten)
[22:22 lordaro@Donald git-test] > git rebase -i n1
Successfully rebased and updated refs/heads/n2.
[22:23 lordaro@Donald git-test] > git lg -5
* 0c91533 - (HEAD -> n2) x4 (9 seconds ago)<Charles Pigott>
* f7733cc - x3 (10 seconds ago)<Charles Pigott>
* b17aa11 - (n1) x2 (2 minutes ago)<Charles Pigott>
* 3533c6a - x1 (2 minutes ago)<Charles Pigott>
* ee36328 - y1 (2 minutes ago)<Charles Pigott>
[22:23 lordaro@Donald git-test] > # tada! how did i do this? by the magic of deleting the old "dead" commits
[22:23 lordaro@Donald git-test] > # from the rebase list, as those are old commits and we don't want those anymore
[22:24 lordaro@Donald git-test] >