Re: [PATCH v2] user-manual: mention git gui citool (commit, amend)

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Johannes Schindelin <Johannes.Schindelin@...>
Cc: Steffen Prohaska <prohaska@...>, Git Mailing List <git@...>
Date: Monday, August 6, 2007 - 5:36 am

Johannes Schindelin wrote:

For cases like that, sure, partial commits are dangerous. On the other 
hand, I've sometimes done partial commits for things like correcting 
erroneous comments in code I'm working on, where there is no functional 
change whatsoever in the hunk I'm committing and where I want to isolate 
the corrections from the functional changes I *am* working on.

Also, when I'm working on a topic branch in my local sandbox I like to 
do lots of work-in-progress commits. I usually do those based on the 
granularity of my mental model of what I'm working on, and I have no 
expectation whatsoever that any particular percentage of them represent 
working code or even code that compiles. Sometimes I do partial commits 
in that situation too: I make a change to some function in a file that 
I'm editing elsewhere, and commit just that hunk with a commit log 
message reminding me of why I made the change. Those commits are not 
intended for public consumption; they're just to help me keep track of 
my own work. Once everything is in a working state, I do a squash merge 
or a bunch of cherry-pick -n invocations to build some revisions to 
publish to the outside world, and *then* I am in "each commit must 
represent a non-broken state" mode.

The great thing about git (well, *one* of the great things) is that it 
unifies those two workflows in one system. With, say, svn, the "lots of 
little checkpoints of my work in progress" part of that is awkward at 
best, because it's very much oriented around an "if the version control 
system knows about a change, it is by definition published to the 
outside world" model.

So I guess my point, after all that, is just that assumptions that are 
valid in the context of one workflow are not necessarily as valid in 
others, and that even in a particular context, not all changes are 
created equal.

-Steve
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] user-manual: mention git gui citool (commit, amend), Steffen Prohaska, (Mon Jul 30, 12:11 pm)
Re: [PATCH v2] user-manual: mention git gui citool (commit, ..., Johannes Schindelin, (Sun Aug 5, 9:58 am)
Re: [PATCH v2] user-manual: mention git gui citool (commit, ..., Johannes Schindelin, (Sun Aug 5, 8:26 pm)
Re: [PATCH v2] user-manual: mention git gui citool (commit, ..., Johannes Schindelin, (Sun Aug 5, 8:22 pm)
Re: [PATCH v2] user-manual: mention git gui citool (commit, ..., Steven Grimm, (Mon Aug 6, 5:36 am)
Re: [PATCH v2] user-manual: mention git gui citool (commit, ..., Johannes Schindelin, (Mon Aug 6, 7:51 am)
Re: [PATCH v2] user-manual: mention git gui citool (commit, ..., Johannes Schindelin, (Sun Aug 5, 10:48 am)