https://github.com/brlin-tw/pivot-submodule-git-dir
Fix problems derived from the Git submodules' ".git" directory not being the real Git repository directory.
https://github.com/brlin-tw/pivot-submodule-git-dir
git git-submodules utility
Last synced: 2 months ago
JSON representation
Fix problems derived from the Git submodules' ".git" directory not being the real Git repository directory.
- Host: GitHub
- URL: https://github.com/brlin-tw/pivot-submodule-git-dir
- Owner: brlin-tw
- Created: 2024-11-09T07:42:32.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-11-09T14:41:21.000Z (6 months ago)
- Last Synced: 2025-01-22T08:45:44.836Z (4 months ago)
- Topics: git, git-submodules, utility
- Language: Shell
- Homepage: https://gitlab.com/brlin/pivot-submodule-git-dir
- Size: 48.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSES/AGPL-3.0-or-later.txt
Awesome Lists containing this project
README
# The pivot-submodule-git-dir utility
Fix problems derived from the Git submodules' ".git" directory not being the real Git repository directory.
[](https://gitlab.com/brlin/pivot-submodule-git-dir/-/pipelines) [](https://github.com/brlin-tw/pivot-submodule-git-dir/actions/workflows/check-potential-problems.yml) [](https://pre-commit.com/) [](https://api.reuse.software/info/gitlab.com/brlin/pivot-submodule-git-dir)## The problem
Git submodules can't be easily mounted into a VM or container without breaking the Git functionality within the VM or container.
## The workaround
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).
## Limitation
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.
## Installatioon
Follow the following instructions to install the product:
1. Download the release archive of the product from [the Releases page](https://gitlab.com/brlin/pivot-submodule-git-dir/-/releases).
1. Extract the release archive using your preferred archive manipulation application/program.
1. Install [the pivot-submodule-git-dir program](pivot-submodule-git-dir) to the .local/bin sub-directory of your home directory, ensure the installed program has executable Unix file permission set.
1. Ensure the "${HOME}/.local/bin" directory is in your command search PATHs.## Usage
Follow the following instructions to use the product:
1. Launch your preferred text terminal.
1. Change the working directory to the submodule worktree directory you wish to operate on.
1. Run the following command to start the operation:```bash
pivot-submodule-git-dir
```## Licensing
Unless otherwise noted(individual file's header/[REUSE.toml](REUSE.toml)), this product is licensed under [the 3.0 version of the GNU Affero General Public License](https://www.gnu.org/licenses/agpl-3.0.en.html), or any of its more recent versions of your preference.
This work complies to [the REUSE Specification](https://reuse.software/spec/), refer to the [REUSE - Make licensing easy for everyone](https://reuse.software/) website for info regarding the licensing of this product.