git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Frank Li" <lznuaa@gmail.com>
To: "Junio C Hamano" <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: how to omit rename file when commit
Date: Mon, 19 Jan 2009 17:35:41 +0800	[thread overview]
Message-ID: <1976ea660901190135k71087673p85e995878e539a8f@mail.gmail.com> (raw)
In-Reply-To: <7v63kbr6zc.fsf@gitster.siamese.dyndns.org>

For example:
there are 2 file. a.c and e.c
I modify e.c.
and git mv a.c b.c

git update-index e.c

I just want to commit e.c and don't commit rename(a.c -> b.c)

I am debuging a tortoisegit.  at commit dialog, there will be show all
changed as
[x] rename (a.c => b.c)
[x] modify (e.c)
button [OK]

assume user uncheck rename
[]rename (a.c=>b.c)
[x]modify (e.c)

then click okay.

I don't know use which git command to handle this case.
if git mv b.c a.c, local working copy will be changed.


2009/1/19 Junio C Hamano <gitster@pobox.com>:
> "Frank Li" <lznuaa@gmail.com> writes:
>
>> For example there are a file a.c at git repository.
>> use
>> git mv a.c b.c
>>
>> git status:
>> # On branch master
>> # Changes to be committed:
>> #   (use "git reset HEAD <file>..." to unstage)
>> #
>> #       renamed:    a.c -> b.c
>>
>> If we don't want to stage this change at this commit,  what can I do?
>
> I may be misunderstanding what you want to do, but wouldn't "git mv b.c
> a.c" undo whatever you did?
>
>

  reply	other threads:[~2009-01-19  9:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-19  9:13 how to omit rename file when commit Frank Li
2009-01-19  9:16 ` Junio C Hamano
2009-01-19  9:35   ` Frank Li [this message]
2009-01-19 11:01     ` Jakub Narebski
2009-01-19 17:41     ` Boyd Stephen Smith Jr.

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=1976ea660901190135k71087673p85e995878e539a8f@mail.gmail.com \
    --to=lznuaa@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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.
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).