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

Re: can anybody explain the following to a git noob?

From
Tim Uckun <timuckun@gmail.com>
Date
May 22, 2009, 10:35 UTC
Message-ID
<855e4dcf0905220335n367a065fidc65567119c0a5a3@mail.gmail.com>
In-Reply-To
<4A1671E5.4030400@op5.se>
Show 6 quoted lines
>> It just worked out that way.  I am experimenting with a rails app and
>> those plugins were pulled from github.
>>
>
> But not, I take it, as submodules?
>
That's right.
Show 6 quoted lines
>
> Because from git's point of view, they were already managed in a
> separate repository as a submodule. When you have submodules in a
> repository, the parent repository can't (well, won't anyways) track
> files inside the submodule directory, so git ignores everything under
> a worktree subdirectory that contains a .git folder.

I deleted the .git directory in that subfolder but I got the exact same message. There was a .gitignore file in there so I deleted that too and still got the same message. I think since the initial checkin has the .git folder in it git has already decided it's not going to track it.

Anyway as you can see from my original post I decided to mv the 'test' directory instead because it has no .git directory in it.

>
Show 12 quoted lines
>>
>> I'll have to clean up all those and see if the problem remains.
>
> A better way is probably to import those projects as proper
> submodules so you can update them without hassle later. "git help
> submodule" should get you a long way, but be prepared to study the
> docs a little so you understand the caveats with submodules before
> you use them. For instance, you *will* run into problems if you
> later replace a worktree subdirectory belonging to the parent git
> repository with a submodule, so it's really better to have them as
> submodules from the start.
>

To be honest I am just trying to learn the basics now and would rather get comfortable with those before I mess around with submodules.

I still don't have an answer as to why the renamed test_new directory exists master branch and why both the original 'test' directory and the renamed 'test_new' directory are missing subdirectories.

Until I understand that I won't feel comfortable using git.
Previous: Andreas EricssonNext: Johannes Sixt
Message 5 of 16 in “can anybody explain the following to a git noob?”
  1. Tim UckunMay 22, 2009
  2. Avery PennarunMay 22, 2009
  3. Tim UckunMay 22, 2009
  4. Andreas EricssonMay 22, 2009
  5. Tim UckunMay 22, 2009
  6. Johannes SixtMay 22, 2009
  7. Tim UckunMay 22, 2009
  8. Julian PhillipsMay 22, 2009
  9. Tim UckunMay 23, 2009
  10. Andreas EricssonMay 22, 2009
  11. Daniel BarkalowMay 22, 2009
  12. Tim UckunMay 23, 2009
  13. Heiko VoigtMay 25, 2009
  14. Tim UckunMay 25, 2009
  15. Sitaram ChamartyMay 22, 2009
  16. Dan LoewenherzMay 22, 2009

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.