Re: "submodule" mistake and a problem

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

 



Am 10/1/2012 12:41, schrieb Howard Miller:
> - I have an existing (long standing) project in git with an upstream in github
> - I added a subdirectory which I had forgotten was itself a git
> project (i.e. it has its own .git directory)
> - I committed the subdirectory (git add /path/to/subdir;  git commit -m ....)
> - I pushed the latest version upstream
> 
> .....at this point I realised that only the directory name had been pushed. SO...
> 
> - git rm /path/to/subdir resulted in fatal: pathspec
> '/path/to/subdir/' did not match any files
> - so I deleted it manually, re-copied the directory and removed its
> ..git directory
> 
> ....I now cannot add or commit the directory. Git just ignores it. I
> have grepped and searched and kind find no reference to this directory
> anywhere. I am completely stumped.
> 
> Can anybody help? I don't want this to be a git subdirectory, I just
> want to be able to add the files (without the .git directory)

Perhaps:

  git rm -f --cached path/to/subdir   # remove from index, keep files
  git add path/to/subdir

-- Hannes
--
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]