Showing posts from October, 2015

git rebase eats my commits when the rebase fail... (no, not really)

I'm playing with git --rebase for the first time. The first patch of the series was fixing coding style, but it was also introducing some coding style errors related to continuation lines. Instead of adding two additional tabs, I was aligning the continuation lines with the previous opening parenthesis. Oops. So I needed to edit the first commit of the series to be able to resent all of them. git makes it quite convenient, right?      $ git --rebase --interactive <commit hash>^ Then git will show a text file for you to edit and choose what to do with each commits. Everything fine until now. My workflow is      $ vi path/to/file.c      $ make path/to/file.o      $ git add path/to/file.c      $ git commit --amend      $ git rebase --continue Well this is awesome, and I had fun rebasing all my 11 commits and it was looking very good. Even when the automatic rebase doesn't work it is very intuitive and great to work with. This is one sample output when the auto