15 points · by tosbourn · 14y ago · 16 comments
I say little-p because I've found it to be a nice tool in certain circumstances, but it's not a very proscriptive process, and it's not always clear that you need it until you already find yourself doing it. So it's nice to identify that it happens, and to give yourself a chance to take advantage by pausing and reflecting before you commit, but honestly that's just good practice regardless.
For me, sometimes I'll write some code, get a commit message ready, then realize as I'm writing my message that there's a better/clearer/more general solution to what I just did, and I use that as an opportunity to improve my commit.
What's nice about this method for us is that you can just look at the list of active pull requests for a project and see what features are in active development and get an easy way to drill down into the progress of each.
I guess you could call it Pull Request Driven Development.
Because issues and PRs are hopelessly intermingled in Github, we create issues with the sole intent of creating an initial PR "feature/1234-api-auth" so we can reference and close the initial ticket.
The issue describes what is the problem and what needs to be accomplished, while the PR body describes what actions will be taken and the overall progress.
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: 2536aw3 implementing feature foo
sfd93ja fixup! implementing feature foo
ok4jzvd fixup! implementing feature foo
k4okvxx fixup! implementing feature foo
2okoswa fixup! implementing feature foo
zxvorm3 fixup! implementing feature foo
ko2koaa fixup! implementing feature foo
And then I rebase when git log --graph --pretty goes off the screen.so maybe one would go on write this comments, commit them as the 'How', and then in the first commit message write the 'What'? then do the first commit and continue from there.... making the 'How' work
- All the TODOs
- Applicable Nota Bene's (you know, "this breaks in X")
- Whether or not I'll be distracted before completing the task with something else that would need a different summary.
Yes, I know what it will do, but a good commit message isn't a generic one-liner that describes it beforehand. What you are looking for is "task driven development".