Re: Files that cannot be added to the index

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Unfortunately I can't share the repos, but I've pasted actual output
showing the problem below. I'm using git version 1.7.4.4 on OSX Lion,
from macports. (I was having the problem on Snow Leopard too.) I am
using `git clone` to make the clone, but it's possible that at some
point the repo was moved or copied with things like mv, cp, rsync, maybe
moving across different filesystems.

seanh@sooty-2:~ % cd /tmp 
seanh@sooty-2:/tmp % git clone ~/Dotfiles/home 
Cloning into home...
done.
seanh@sooty-2:/tmp % cd home 
seanh@sooty-2:/tmp/home % git status
# On branch master
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified:   Text/LOG.txt
#
no changes added to commit (use "git add" and/or "git commit -a")
seanh@sooty-2:/tmp/home % git diff
diff --git a/Text/LOG.txt b/Text/LOG.txt
index 317c80b..13edf26 100644
--- a/Text/LOG.txt
+++ b/Text/LOG.txt
@@ -1,2 +1,21 @@
CONTENTS OF DIFF SNIPPED
seanh@sooty-2:/tmp/home % git add Text/LOG.txt 
seanh@sooty-2:/tmp/home % git status
# On branch master
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified:   Text/LOG.txt
#
no changes added to commit (use "git add" and/or "git commit -a")
seanh@sooty-2:/tmp/home % git add .; git commit
# On branch master
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified:   Text/LOG.txt
#
no changes added to commit (use "git add" and/or "git commit -a")
seanh@sooty-2:/tmp/home % (1) :(

On Fri, Aug 26, 2011 at 04:10:02PM +0200, Michael J Gruber wrote:
> seanh venit, vidit, dixit 26.08.2011 14:26:
> > Can anyone guess what's going on when I have a modified file that
> > shows up in `git status`, but the file cannot be added to the index
> > (or committed)? `git add FILE` does nothing, the file still shows as
> > modified but not added in `git status`.
> > 
> > I have two different repos that have each developed this problem with
> > two different files. I don't know how it happened. The problem occurs
> > wherever the repos are cloned. Even if I delete the local copy (where
> > I'm seeing the problem) and clone the repo again from elsewhere,
> > problem persists.
> 
> A log of your commands (or access to the repo) would help diagnose that,
> along with information about the system and the git version.
> 
> Do you "clone" by making a copy, by any chance?
> 
> Michael
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]