Share .git directory among local repositories of same origin
git-unify - Share .git directory among local repositories of same origin
[verse] 'git unify' init 'git unify' deinit 'git unify' clone [] 'git unify' submodule-add [] 'git unify' submodule-update [] 'git unify' shared-dir [--verify]
Shares files under .git directory among local repositories to squeeze disk usage and/or speed up clone speed. Especially useful for example if you have many repositories that uses same submodules.
deinit:: Reverts the effect of 'git unify init'. Files under .git directoy are no longer shared (not symlinked).
clone:: Does 'git clone' with shared .git directory used/set up. If the remote repository is already shared ('git unify init' is done somewhere), it does not fetches remote directory but instead clones from the shared .git directory.
submodule-add:: Does 'git submodule add' with shared .git directory used/set up.
submodule-update:: Does 'git submodule update --init' with shared .git directory used/set up.
shared-dir:: Prints shared .git directory for current repository. Exits with non-zero code if '--verify' is specified and the directory does not exist.
git-unify shares .git/refs, so local repositories of same origin that are unified shares their branches. Branch updating at one working directory would affect the other.
Written by motemen [email protected]