From: Wincent Colaiuta <win@wincent.com>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: Brian Swetland <swetland@google.com>, git@vger.kernel.org
Subject: Re: git commit workflow question
Date: Sat, 15 Sep 2007 13:31:37 +0200 [thread overview]
Message-ID: <BCFC81AB-0EDD-4C3C-B7D4-DEC60E2565C3@wincent.com> (raw)
In-Reply-To: <20070914181417.GU3099@spearce.org>
El 14/9/2007, a las 20:14, Shawn O. Pearce escribió:
> 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.
Yes, I generally check what's in the index before going ahead with a
commit; in fact I have the following alias in my .bash_profile so
that I can just type "staged" to see what'll be in the commit, along
with an "unstaged" alias for the opposite:
alias staged='git diff --cached'
Having said that, it would be very useful to be able to edit the list
within the commit message buffer for those occasions where you
realise that stuff you have staged in the index really should be two
separate commits. It would enable this very simple workflow:
1. review changes, realize that some of the changes belong in a
separate commit
2. commit, omitting the unwanted changes
3. commit again, this time with the remainder of the changes
Without the ability to edit the list within the commit message buffer
your workflow becomes a bit more cumbersome:
1. review changes, realize that some of the changes belong in a
separate commit
2a. explicitly pass files to commit on the commandline (cumbersome
if number of files is large); or:
2b. use git-commit --interactive (again can be relatively
cumbersome); or:
2c. explicitly unstage unwanted files, commit, then restage them
and commit
So, yes, the proposed functionality isn't necessary by any means, but
it would make some nice usability sugar. I know that in the past my
experience with other SCMs that can do this has made me mistakenly
believe that Git does too.
Cheers,
Wincent
next prev parent reply other threads:[~2007-09-15 11:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20070914103348.GA22621@bulgaria>
2007-09-14 18:14 ` git commit workflow question Shawn O. Pearce
2007-09-15 11:31 ` Wincent Colaiuta [this message]
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=BCFC81AB-0EDD-4C3C-B7D4-DEC60E2565C3@wincent.com \
--to=win@wincent.com \
--cc=git@vger.kernel.org \
--cc=spearce@spearce.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).