https://github.com/b1f6c1c4/git-freeze
Convert git submodules to regular directories
https://github.com/b1f6c1c4/git-freeze
git git-commit git-flow git-submodule git-subtree
Last synced: 10 months ago
JSON representation
Convert git submodules to regular directories
- Host: GitHub
- URL: https://github.com/b1f6c1c4/git-freeze
- Owner: b1f6c1c4
- License: mit
- Created: 2020-03-27T21:02:15.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-09-21T22:47:14.000Z (over 5 years ago)
- Last Synced: 2025-02-09T02:31:32.643Z (about 1 year ago)
- Topics: git, git-commit, git-flow, git-submodule, git-subtree
- Language: Shell
- Homepage:
- Size: 16.6 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# git freeze
> Convert submodules to regular directories
## Why
External dependencies break everytime.
We want to manage everything by ourselves!
## Install
```bash
git clone --depth=1 git@github.com:b1f6c1c4/git-freeze.git
git config --global alias.freeze '!'"$(pwd)/git-freeze/git-freeze"
```
## Usage
```
Usage: git-freeze [-h|--help] [-n|--dry-run]
[--tree|--octopus] [--no-commit]
[--keep-gitmodules]
[--]
Convert submodules to regular directories (of their HEADs)
-n|--dry-run: Just list what commits will be freezed
--tree: Don't modify anything, just give me the tree SHA-1
(implies --no-commit)
--octopus: Preserve history of all submodules by merging
Warning: ENTIRE history of ALL submodules is a huge deal!
--no-commit: Don't commit (like git merge --no-commit)
--keep-git-modules: Do not remove the .gitmodules file
```
Note:
Submodules will be converted to directories of which content are wherever their HEADs point to,
**NOT** where the parent repo index points to.
If you wish to convert based on where the parent repo index points to, align the submodules HEADs with parent repo index first by:
```bash
git submodule update --init --recursive
```
Note:
This tool only modify the **parent repo**. All submodules' worktrees are **NOT touched**.
## License
MIT