git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: "submodule" mistake and a problem

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Oct 1, 2012, 11:42 UTC
Message-ID
<506981C1.3030504@viscovery.net>
In-Reply-To
<CAHVO_92=5u-i+-d__5k7Uoq5pF4iACq9GuBSj4U5MepbKV_jdA@mail.gmail.com>
Am 10/1/2012 12:41, schrieb Howard Miller:
Show 19 quoted lines
> - 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
Previous: Howard MillerNext: Howard Miller
Message 2 of 5 in “"submodule" mistake and a problem”
  1. Howard MillerOct 1, 2012
  2. Johannes SixtOct 1, 2012
  3. Howard MillerOct 1, 2012
  4. Jens LehmannOct 1, 2012
  5. Howard MillerOct 1, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.