git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Brian Swetland <swetland@google.com>
Cc: git@vger.kernel.org
Subject: Re: git commit workflow question
Date: Fri, 14 Sep 2007 14:14:17 -0400	[thread overview]
Message-ID: <20070914181417.GU3099@spearce.org> (raw)
In-Reply-To: <20070914103348.GA22621@bulgaria>

Brian Swetland <swetland@google.com> wrote:
> With perforce I often have a bunch of files modified (having p4 add'd
> or p4 edit'd them) and then only commit a subset of them.  I can do
> this interactively by doing a p4 submit and just removing the files
> I don't want to check in from the list in the changelist description
> when I'm writing up the change description in $EDITOR, invoked by
> p4 submit.
> 
> It seems like my options with git are to invoke git commit with
> a specific list of things to commit, invoke git commit --interactive
> and use the interactive menu thing to shuffle stuff around, or
> manually unstage things until I have the index in a state where
> a git commit without other arguments will do what I want.

Or use git-citool/git-gui to make commits, in which case that
will help you to arrange the index with what you want to commit.
But yes, git-commit does not pay any attention to modifications
made to the template in the edit buffer.

I'm not sure how the Git community would react to being able to edit
the list of files being committed from within the commit message
buffer.  I think most Git users run at least `git diff --cached`
before they commit to make sure they are happy with the difference.
I know a lot of users who do that.  Most/all of those users also do
not stage something into the index until they are happy with the
change, which means there isn't any list of files to remove when
it comes time to make the commit as the contents of the index is
exactly what should be committed.

I used p4 for a while before Git was invented.  I found the file
editing feature useful then because there was no concept of the
index.  Now with Git I've embraced the index so much that I'm not
sure I can work without it, and I don't need to remove files from
my index during the actual commit itself.
 
-- 
Shawn.

       reply	other threads:[~2007-09-14 18:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20070914103348.GA22621@bulgaria>
2007-09-14 18:14 ` Shawn O. Pearce [this message]
2007-09-15 11:31   ` git commit workflow question Wincent Colaiuta
2007-09-15 12:07     ` David Watson

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=20070914181417.GU3099@spearce.org \
    --to=spearce@spearce.org \
    --cc=git@vger.kernel.org \
    --cc=swetland@google.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).