On 05/03/2010 09:39 AM, Cole Robinson wrote:
A simplification of my workflow is:
git checkout master
git pull
git checkout -b workbranch
Hack, committing any changes along the way
git rebase -i to clean up the commits
The one thing I would add here would be:
git checkout master
git pull
git checkout workbranch
git rebase master
(fix any conflicts)
to bring your workbranch up to date with master, and make it less likely
others would encounter conflicts when they try to apply your patches to
their work tree.
git format-patch -#
git send-email
I recently learned that git send-email will send directly from the git
history, without the bother of using git format-patch to create
intermediate files. For example:
git send-email -1
will send an email containing the latest commit on the current branch.
git send-email --compose -5
will open your editor of choice to compose an email introducing the
patch series (you should put "[PATCH 0/n]" at the beginning of the
subject where n is, in this example, 5). After you've saved that mail,
it will send the introduction mail followed by a single email for each
of the last 5 commits on the current branch.
I much prefer doing it this way, because I don't end up with tons of
patchfiles lying around (which usually results in me sending the wrong
set of files).