From: Andreas Ericsson <ae@op5•se>
To: Tim Uckun <timuckun@gmail•com>
Cc: Avery Pennarun <apenwarr@gmail•com>, git@vger•kernel.org
Subject: Re: can anybody explain the following to a git noob?
Date: Fri, 22 May 2009 11:35:33 +0200 [thread overview]
Message-ID: <4A1671E5.4030400@op5.se> (raw)
In-Reply-To: <855e4dcf0905212244r454a5c21w7bdbfb566a28efb8@mail.gmail.com>
Tim Uckun wrote:
>>> *********Try to rename a directory WTF?: Git thinks any directory with a
>>> .git folder is empty and refuses to rename the directory.
>> Well, why do other folders contain .git directories?
>
> 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?
>> Are they
>> *separate* git repositories? If so, git doesn't know what to do with
>> them and leaves them alone. (Well, in fact it treats them as
>> submodules.)
>
>
> yes they are separate repositories. I would be happy if it left them
> alone or treated them as submodules. I was just puzzled as to why git
> thought they were empty when they were clearly not.
>
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.
>> All your other weird problems seem to come from this, as far as I can
>> tell. If not, it would be helpful if you could give *complete*
>> reproduction steps for your problem.
>
> Those were the complete steps. I did no other operations on the
> directory. So the fact that the test directory is misbehaving is
> because a directory in the vendor hierarchy has a .git folder?
>
> 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.
HTH
--
Andreas Ericsson andreas.ericsson@op5•se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
Register now for Nordic Meet on Nagios, June 3-4 in Stockholm
http://nordicmeetonnagios.op5.org/
Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.
next prev parent reply other threads:[~2009-05-22 9:35 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-22 3:46 can anybody explain the following to a git noob? Tim Uckun
2009-05-22 5:02 ` Avery Pennarun
2009-05-22 5:44 ` Tim Uckun
2009-05-22 9:35 ` Andreas Ericsson [this message]
2009-05-22 10:35 ` Tim Uckun
2009-05-22 10:44 ` Johannes Sixt
2009-05-22 11:36 ` Tim Uckun
2009-05-22 12:04 ` Julian Phillips
2009-05-23 8:03 ` Tim Uckun
2009-05-22 12:22 ` Andreas Ericsson
2009-05-22 17:33 ` Daniel Barkalow
2009-05-23 8:21 ` Tim Uckun
2009-05-25 11:10 ` Heiko Voigt
2009-05-25 12:52 ` Tim Uckun
2009-05-22 11:03 ` Sitaram Chamarty
2009-05-22 13:36 ` Dan Loewenherz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A1671E5.4030400@op5.se \
--to=ae@op5$(echo .)se \
--cc=apenwarr@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=timuckun@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox