From: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: How to split a big commit
Date: Mon, 4 Apr 2011 21:25:38 +0700 [thread overview]
Message-ID: <BANLkTinpiR2sHS35uqD+uLnTKVtimhT7eg@mail.gmail.com> (raw)
In-Reply-To: <20110404130016.GA16975@kytes>
On Mon, Apr 4, 2011 at 8:00 PM, Ramkumar Ramachandra <artagnon@gmail.com> wrote:
> To split a big commit, I simply reverse-diff-apply the changes that I
> don't want in the big commit, and I stage all changes. Then, I again
> reverse-diff-apply all the staged changes, and keep that in the
> unstaged portion.
Won't work for me. The reverse part would be way larger than the to-commit part.
> ...
> I can afford to do this kind of jugglery very easily because I use
> Magit with Emacs. After highlighting the relevant portions,
> reverse-diff-apply is one keystroke :)
Hmm.. interesting. Never got around to actually use magit. I may have
a good reason now.
> But yes, you're probably right-
> there should be an easier way to do this. Maybe a 'git split' that
> allows you to interactively select the portions of an existing commit
> that you'd like to exclude from the commit and turn into a new commit?
Hmm..yeah something like grep for chunks, then automatically splitting
those chunks out would be nice.
I have another use for such a tool too. When .po files are
automatically updated by intltool (gnome translation helper tool),
comment lines are all changed because they contain source line and
those line likely change. With this tool I can filter out comment-only
changes.
Thanks for the idea.
--
Duy
next prev parent reply other threads:[~2011-04-04 14:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-04 11:52 How to split a big commit Nguyen Thai Ngoc Duy
2011-04-04 13:00 ` Ramkumar Ramachandra
2011-04-04 14:25 ` Nguyen Thai Ngoc Duy [this message]
2011-04-05 0:08 ` Jonathan Nieder
2011-04-05 2:31 ` Lasse Makholm
2011-04-05 2:52 ` Nguyen Thai Ngoc Duy
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=BANLkTinpiR2sHS35uqD+uLnTKVtimhT7eg@mail.gmail.com \
--to=pclouds@gmail.com \
--cc=artagnon@gmail.com \
--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 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 NNTP newsgroup(s).