On 09/25/2014 11:54 PM, Kevin Grittner wrote:
> I have fixed the bug reported by Heikki; be sure to grab that.
Will do.
> I have been merging in changes to master as I go, so that bit rot
> doesn't accumulate, but I don't squash or rebase; hopefully that
> style works for you.
IMO it only really matters before the final push to master; before then
it's all just a matter of how you prefer to work.
I'm a big fan of rebasing my feature branches as I go:
git tag before-rebase git pull --rebase ... do any merges during rebase ... git tag -d before-rebase
For bug fixes I tend to commit them separately, then when I rebase I
squash them into the relevant patch. Git's "fixup! " commits are really
handy for this; if I have a commit:
Add widget support
Everyone wants more widgets.
and want to fix an issue in that commit I can just commit
fixup! Add widget support
It's spelled widget not wodget
and when I "git rebase --autosquash master" they get automatically
squashed into the relevant changeset. (I usually run with the config
rebase.autosquash enabled so this happens during my rebase pulls on top
of master).
I got in the habit while working on RLS, to keep me sane with that
patchset, and find it works well for me.
However, everyone has a different work style. Colour me happy if it's in
git at all.
-- Craig Ringer http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services