All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Avery Pennarun <apenwarr@gmail.com>
Cc: Daniel Thomas <drt24@srcf.ucam.org>,
	Git Mailing List <git@vger.kernel.org>
Subject: the careless committer and fear of commitment (rebase -i vs add -p)
Date: Tue, 30 Mar 2010 00:02:48 -0500	[thread overview]
Message-ID: <20100330045704.GA9004@progeny.tock> (raw)
In-Reply-To: <32541b131003292132q10db3c5eh1bb6443d625fcb82@mail.gmail.com>

Avery Pennarun wrote:

> I generally just make a temporary commit
> with "git commit", then revise it using "git commit --amend" over
> time.
> 
> Or else I make a series of commits, then *later* squash them all
> together using 'git merge --squash' or 'git rebase -i'.
> 
> It seems like the suggested feature would encourage people to do it
> the "wrong" way (not creating temporary commits, thus making it easy
> to make a mistake and blow things away) just because they aren't aware
> of the above options.
> 
> Is there a reason that these methods don't work for you?

I like ‘git diff --cached’ and ‘git diff’ to show the entire list
of staged and unstaged changes.  I don’t consider this “wrong” at all.
Generally, once something becomes precious enough to be worth keeping,
it is already in presentable form and I can come up with an appropriate
commit message.  I understand that other people work differently; this
is just my personal preference.

I also use the stash heavily, which maybe mitigates the “content could
be blown away with a simple rm -f” problem.

You might also be interested in Pasky’s analysis at
http://thread.gmane.org/gmane.comp.version-control.git/138641/focus=138672

Cheers,
Jonathan

  reply	other threads:[~2010-03-30  5:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-28 19:32 [GSoC Proposal/RFC] Rolling commit message writing Daniel Thomas
2010-03-29 20:31 ` Avery Pennarun
2010-03-30  3:05   ` Jonathan Nieder
2010-03-30  4:32     ` Avery Pennarun
2010-03-30  5:02       ` Jonathan Nieder [this message]
2010-03-30  6:14         ` the careless committer and fear of commitment (rebase -i vs add -p) Ramkumar Ramachandra
2010-03-30 17:27   ` [GSoC Proposal/RFC] Rolling commit message writing Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100330045704.GA9004@progeny.tock \
    --to=jrnieder@gmail.com \
    --cc=apenwarr@gmail.com \
    --cc=drt24@srcf.ucam.org \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.