1

I've ported a SVN repo to GIT, but previously I have an svn:external file and it's not recognized in GIT. Is it possible to do external files like SVN where you have a single source of a file, but checked-out into other directories of the same repo?

For example:

- test/img/hello.gif (original file)
- test2/img/hello.gif (references the first file)
- test3/img/hello.gif (references the first file)

I've read some things around 'sparse-checkout' but not sure how you could actually just reference/check out one file.

calebo
  • 2,758
  • 7
  • 37
  • 65

1 Answers1

0

Since you have only one repo, you cannot use the "submodule following a branch" feature.

That leaves only symlinks (I agree here with Zach Latta's comment), even though they are tricky to put in place when used with Windows: see "Git Symlinks in Windows".
A symlink isn't exactly the equivalent of an SVN:external (since it cannot reference a specific revision like svn:external can), but it can be a good enough workaround in your case.

Community
  • 1
  • 1
VonC
  • 1,042,979
  • 435
  • 3,649
  • 4,283
  • Thanks, symlinks seems the way to go, I'll read up more on that, currently having issues with developers working on different environments, making symlinks files unreadable on windows. – calebo Nov 19 '13 at 23:29