3

I have the following setup: One git repo (lets call it "libutil"), and a lot of projects using said libutil as a git submodule.

What I want:

  • to be able to change, commit and push my libutil from every project folder
  • to have (physically, not just a symlink or sth.) said libutil inside every project folder
  • not to have the whole history of libutil inside every project folder

I want to tell git that it should only keep a "working copy" of libutil for every project, not store the whole libutil-history dozens of times. One the other hand, those working copies should remain valid git repos, so I'm still able to switch to arbitrary commits when needed (by fetching them from the server).

Now is this possible? And how do I set it up?

radioflash
  • 405
  • 5
  • 14

1 Answers1

1

This use case seems like a duplicate to "git shallow submodules" discussion:

Git shallow submodules

Community
  • 1
  • 1
user1338062
  • 11,939
  • 3
  • 73
  • 67
  • This is *perfect*. Exactly what I was looking for... Embarassing that I didn't find it myself, and thanks for the quick answer! – radioflash Sep 20 '12 at 11:21