This is a nice little-p process. I've kind of stumbled into it from time to time when I'm having trouble nailing down what I want to do. Tower.app actually helps, because it leaves your commit message betweens cancels.
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.
I'm not sold on doing this at the commit level, but we have been using Pull Requests on Github in this fashion for Wufoo and SurveyMonkey. We start with an initial commit to start the branch for a new feature and then immediately initiate a Pull Request. That pull request contains a list of items that need to be done for the feature and as it gets developed you can see how commits are working towards making that pull request ready. This also helps tremendously with code reviews because you can do them as the feature is being developed.
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.
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:
In Code Complete McConnell writes an example in which he writes the main ideas of how his code will work as comments in an empty file.
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
[+] [-] ubercore|13 years ago|reply
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.
[+] [-] unfoldedorigami|13 years ago|reply
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.
[+] [-] ericclemmons|13 years ago|reply
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.
[+] [-] harlanlewis|13 years ago|reply
[+] [-] kenmazy|13 years ago|reply
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.[+] [-] elviejo|13 years ago|reply
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
[+] [-] walle_|13 years ago|reply
[+] [-] tosbourn|13 years ago|reply
[+] [-] clwoodson|13 years ago|reply
[+] [-] josegonzalez|13 years ago|reply
[+] [-] tosbourn|13 years ago|reply
[+] [-] edb|13 years ago|reply
[+] [-] tosbourn|13 years ago|reply