2

I am evaluating using Git at my work.

One of the many questions that were raised by interested parties is

Shared components -

The SCM toolset must be able to manage shared components without duplicating the code base. Duplication of the code base would result in code divergence. This is usually accomplished through the use of virtual pointers. Two systems/applications share the same code base, dll, configuration file, etc

I know that isn't actually a question, but I digress.

I would normally use Maven to pull in binary artifacts, or checkout from a shared repo and use my build tools to set everything into the right place, but that is apparently not an option with this requirement.

Is it possible to have virtual folder's in a Git repository?

Community
  • 1
  • 1
Tristan
  • 219
  • 3
  • 13
  • 1
    What do you mean by virtual folders? If you need to separate binaries from actual code, you can use submodules. – vissi Jan 22 '13 at 21:13
  • That's the problem I have. For binaries I use Maven/NuGet. For foreign source that I want as source for some reason...i check out from the foreign repo. But decision makers have decided that this is a requirement... – Tristan Jan 25 '13 at 00:26

1 Answers1

3

If by Virtual Pointer you mean symlink, then yes, git does "support" symlink (see "What does git do to files that are a symbolic link?")

But that is not the solution used for source dependencies (ie a git repo needing the content of other git repos).
For that, you need submodules, which allows you to reference a fixed point in the history of other git repos. See for instance "Maintaining project with plugins in git".

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250