0

I've got a couple of processes which use the same git repositories, but they insist on treating them as separate things. That leads to me having a number of clones of the same repository under different local locations.

Is there any existing wrapper for git that would ensure I have only one repo with hard links? What I'd expect it to do is:

  • On clone, check in $GIT_CLONES_PATH if a given url has been checked out already. If it's not there, clone to that location, then hardlink-clone to requested path.
  • On pull, first pull in $GIT_CLONES_PATH, then pull locally.
  • On push, push to the remote of $GIT_CLONES_PATH (to prevent conflicts after local push), then pull in the common location $GIT_CLONES_PATH.

I guess there are hundreds of edge cases I didn't think about here, so: does anyone know some existing project that does this?

viraptor
  • 33,322
  • 10
  • 107
  • 191

1 Answers1

-1

clone a local repo. If it's done from a local one, you should get hardlinks.

Adam Dymitruk
  • 124,556
  • 26
  • 146
  • 141