circuitBurn
circuitBurn

Reputation: 903

.git folders appearing as .git file?

As of this morning, any time I clone a repository the usual .git directories are appearing as .git files. I've got no file associations in the registry that I can see, and nobody at the office knows what's going on. I'm running Windows 7. What could be causing this?

EDIT: This appears to only happen to submodules.

Thanks in advance!

Upvotes: 2

Views: 1070

Answers (1)

VonC
VonC

Reputation: 1328602

It should be linked to submodules as:

  • a git repo has only one .git directory of its own
  • a submodule not yet loaded in that git repo will contain a 'git-file' as introduced in 2008

From the git repository layout documentation:

You may find these things in your git repository (.git directory for a repository associated with your working tree, or 'project'.git directory for a public 'bare' repository.
It is also possible to have a working tree where .git is a plain ascii file containing gitdir: <path>\n, i.e. the path to the real git repository).

See the Git Book on Submodules for more.

Upvotes: 2

Related Questions