Re: Multi-branch committing in git, revisited - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Multi-branch committing in git, revisited
Date
Msg-id 15152.1285125571@sss.pgh.pa.us
Whole thread Raw
In response to Re: Multi-branch committing in git, revisited  ("David E. Wheeler" <david@kineticode.com>)
Responses Re: Multi-branch committing in git, revisited
Re: Multi-branch committing in git, revisited
Re: Multi-branch committing in git, revisited
List pgsql-hackers
"David E. Wheeler" <david@kineticode.com> writes:
> On Sep 21, 2010, at 8:01 PM, Bruce Momjian wrote:
>>> Then they'd all be patched and staged.
>> 
>> If I understand correctly, that 'git reset' will mark all branch changes
>> as staged but not committed, and then you can commit all branches at
>> once and push it.  Is that right?

> Right.

You sure about the "staged" part?  If I'm reading the git-reset man
page correctly, this command will revert your commit position and index,
leaving only the modified work files behind.  So it looks to me like
you need another round of git add, or at least git commit -a.

Offhand I think I like Andrew's recommendation of a shortlived branch
better.  In essence your idea is using the tip of "master" itself as a
shortlived branch, which is maybe a bit too cute.  If you get distracted
and need to do something else for awhile, the tip of "master" is not
where you want your not-yet-pushable work to be.

(For those following along at home, there are some mighty instructive
examples in the git-reset man page.)
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Multi-branch committing in git, revisited
Next
From: Bruce Momjian
Date:
Subject: Re: Multi-branch committing in git, revisited