Fix problems derived from the Git submodules' ".git" directory not being the real Git repository directory.
https://gitlab.com/brlin/pivot-submodule-git-dir
Git submodules can't be easily mounted into a VM or container without breaking the Git functionality within the VM or container.
The utility program provided by this solution swaps the actual Git repository directory of the submodule back to the ".git" directory entry of the submodule worktree, while maintaining a symbolic link from the original location to maintain functionality of basic Git operations(commit/log).
Note that as Git itself isn't aware of the change the submodule will become broken when path-related changes are made to the submodule, we expect the user to aware of this limitation and interact with it accordingly.
Follow the following instructions to install the product:
- Download the release archive of the product from the Releases page.
- Extract the release archive using your preferred archive manipulation application/program.
- Install the pivot-submodule-git-dir program to the .local/bin sub-directory of your home directory, ensure the installed program has executable Unix file permission set.
- Ensure the "${HOME}/.local/bin" directory is in your command search PATHs.
Follow the following instructions to use the product:
-
Launch your preferred text terminal.
-
Change the working directory to the submodule worktree directory you wish to operate on.
-
Run the following command to start the operation:
pivot-submodule-git-dir
Unless otherwise noted(individual file's header/REUSE.toml), this product is licensed under the 3.0 version of the GNU Affero General Public License, or any of its more recent versions of your preference.
This work complies to the REUSE Specification, refer to the REUSE - Make licensing easy for everyone website for info regarding the licensing of this product.