Re:Commit Driven Development
by kenmazy on Wednesday August 15, 2012 @12:10PM
(#4386651)
Usually I write a little code, commit what it is supposed to do, then fixup all the little edge cases and bugs that come naturally. But what's important is that first commit is sets up a little problem with a clear goal, and then everything afterwards works toward that goal.
Two extremely useful aliases:
[alias]
fi = !sh -c 'git commit -m \"fixup! $(git log -1 --format='\\''%s'\\'' $@)\"' -
ri = rebase --interactive --autosquash
First alias allows me to create a commit prefixed with fixup! very easily. So workflow looks like this:
Two extremely useful aliases:
First alias allows me to create a commit prefixed with fixup! very easily. So workflow looks like this: And then I rebase when git log --graph --pretty goes off the screen.