Re: Question about "git commit -a"

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andreas Ericsson
Date: Friday, October 5, 2007 - 1:52 am

Paolo Ciarrocchi wrote:


This isn't really a valid command. I'm not sure where you got it from.


I do something like that, except that for full-file commits I'd rather
say

	git commit -s A B E

I never pass -m to git commit. It's too easy to get into habit of being
sloppy with historic documentation that way.


Again not a valid command, but...


See above :)

There's also the times when I hack on some feature and find some small
bug/easy-to-write-feature, so I make the change for that other thing,
swap to a different branch and do 'git commit -s --interactive' to
just break out that small fix.

Or if I have to add some logic to some other function in a file I've
modified for other purposes and want it to be two separate commits,
I just make the change and then run 'git commit --interactive' to
make it two separate commits.

I just don't do 'git commit -a' for the same reason I don't do
'git commit -m', really. It tends to be habit-forming, and bisect
has saved my arse enough times for me to *want* my changes to be
small and isolated. Debugging a 5-line patch is so much more pleasant
than debugging a 30k-lines one that spans over several different files.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
-
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:
Question about "git commit -a", Paolo Ciarrocchi, (Thu Oct 4, 8:38 am)
Re: Question about "git commit -a", Matthieu Moy, (Thu Oct 4, 8:43 am)
Re: Question about "git commit -a", Paolo Ciarrocchi, (Thu Oct 4, 8:48 am)
Re: Question about "git commit -a", Wincent Colaiuta, (Thu Oct 4, 8:58 am)
Re: Question about "git commit -a", Nguyen Thai Ngoc Duy, (Thu Oct 4, 1:33 pm)
Re: Question about "git commit -a", Johannes Schindelin, (Thu Oct 4, 2:10 pm)
Re: Question about "git commit -a", Nguyen Thai Ngoc Duy, (Thu Oct 4, 2:16 pm)
Re: Question about "git commit -a", Andy Parkins, (Thu Oct 4, 2:25 pm)
Re: Question about "git commit -a", Shawn O. Pearce, (Thu Oct 4, 2:26 pm)
Re: Question about "git commit -a", Miles Bader, (Thu Oct 4, 11:04 pm)
Re: Question about "git commit -a", Paolo Ciarrocchi, (Fri Oct 5, 1:39 am)
Re: Question about "git commit -a", Andreas Ericsson, (Fri Oct 5, 1:52 am)
Re: Question about "git commit -a", Paolo Ciarrocchi, (Fri Oct 5, 2:06 am)
Re: Question about "git commit -a", Andreas Ericsson, (Fri Oct 5, 3:02 am)
Re: Question about "git commit -a", Matthieu Moy, (Fri Oct 5, 3:11 am)
Re: Question about "git commit -a", Andreas Ericsson, (Fri Oct 5, 3:14 am)
Re: Question about "git commit -a", Wincent Colaiuta, (Fri Oct 5, 3:48 am)
Re: Question about "git commit -a", Matthieu Moy, (Fri Oct 5, 4:35 am)
Re: Question about "git commit -a", Andreas Ericsson, (Fri Oct 5, 5:17 am)
Re: Question about "git commit -a", Paolo Ciarrocchi, (Fri Oct 5, 5:19 am)
Re: Question about "git commit -a", Andreas Ericsson, (Fri Oct 5, 5:23 am)
Re: Question about "git commit -a", Matthieu Moy, (Fri Oct 5, 5:45 am)
Re: Question about "git commit -a", Kristian , (Fri Oct 5, 8:56 am)
Re: Question about "git commit -a", Matthieu Moy, (Fri Oct 5, 9:33 am)
Re: Question about "git commit -a", Marko Macek, (Fri Oct 5, 11:16 am)
Re: Question about "git commit -a", Dmitry Potapov, (Fri Oct 5, 2:10 pm)
Re: Question about "git commit -a", Andy Parkins, (Sat Oct 6, 12:43 am)
Re: Question about "git commit -a", Linus Torvalds, (Sat Oct 6, 9:13 am)
Re: Question about "git commit -a", Marko Macek, (Sat Oct 6, 11:12 pm)
Re: Question about "git commit -a", Wincent Colaiuta, (Sun Oct 7, 5:26 am)
Re: Question about "git commit -a", Dmitry Potapov, (Sun Oct 7, 7:50 am)
Re: Question about "git commit -a", Johannes Schindelin, (Sun Oct 7, 9:26 am)