I forgot to mention that I'm using Git 220.127.116.11 which appears to be the
most current package for an OpenSUSE 11.2 install.
You are doing exactly what I did, but in your example, I got a, b and c
in the clone instead of just a and c.
Maybe this is just an old bug.
-=> Gregg <=-
On 08/29/2010 06:29 PM, Konstantin Khomoutov wrote:
> On Aug 30, 1:54 am, gsl1 <gslac...@verizon.net> wrote:
>> I created a local git repository and committed a directory of files to
>> it successfully. I then altered one of the files and committed it
>> again. Then I did a git mv on the same file to a new file. All worked
>> as expected. Next I made a new local repository of this repository
>> with git clone. I noticed that the clone contained a copy of the OLD
>> file that I had git mv'd in the original repository. How can I avoid
>> obtaining a clone of files that were moved to new files in the
>> original repository?
>> In addition, how can I easily identify all files that are old moved
>> files within the clone?
> Below, I tried to reproduce what I think you described, and it worked
> as I would expect it to work.
> /tmp% mkdir repo
> /tmp% cd repo
> repo% git init
> Initialized empty Git repository in /tmp/repo/.git/
> repo% touch a b
> repo% git add .
> repo% git commit -m 'Root commit'
> [master (root-commit) 64acd81] Root commit
> 0 files changed, 0 insertions(+), 0 deletions(-)
> create mode 100644 a
> create mode 100644 b
> repo% echo x >b
> repo% git commit b -m 'altered b'
> [master 83abeeb] altered b
> 1 files changed, 1 insertions(+), 0 deletions(-)
> repo% git mv b c
> repo% git status
> # On branch master
> # Changes to be committed:
> # (use "git reset HEAD <file>..." to unstage)
> # renamed: b -> c
> repo% git commit -m 'renamed b to c'
> [master ca3075f] renamed b to c
> 1 files changed, 0 insertions(+), 0 deletions(-)
> rename b => c (100%)
> repo% ls
> a c
> repo% cd ..
> /tmp% git clone repo newrepo
> Initialized empty Git repository in /tmp/newrepo/.git/
> /tmp% cd newrepo
> newrepo% ls
> a c
> newrepo% git --version
> git version 1.7.1
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To post to this group, send email to git-us...@googlegroups.com.
To unsubscribe from this group, send email to
For more options, visit this group at