https://github.com/jstenmark/gitsubmodulesparser
Utility to convert .gitmodules configurations into git submodule add commands.
https://github.com/jstenmark/gitsubmodulesparser
archlinux automation cli dotfiles git gitmodule gitmodules python submodules utility
Last synced: 13 days ago
JSON representation
Utility to convert .gitmodules configurations into git submodule add commands.
- Host: GitHub
- URL: https://github.com/jstenmark/gitsubmodulesparser
- Owner: jstenmark
- License: mit
- Created: 2023-10-07T15:44:50.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-14T12:55:59.000Z (about 2 years ago)
- Last Synced: 2024-04-24T10:54:29.875Z (over 1 year ago)
- Topics: archlinux, automation, cli, dotfiles, git, gitmodule, gitmodules, python, submodules, utility
- Language: Python
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# gitsubmodulesparser
Convert `.gitmodules` entries into `git submodule add` commands.
## Usage
```bash
# Install deps
pip3 install -r requirements.txt
```
```bash
# Syntax
python3 convert_gitmodules.py [gitmodules_path] [--force]
```
- `gitmodules_path` (optional): Path to the `gitmodules` file. Default is ".gitmodules".
- `--force` (optional): Include the "--force" flag in the `git submodule add` command. Default is not to include it.
## Example
```bash
# To convert Gitmodules, run the convert_gitmodules.py script.
python convert_gitmodules.py ~/.gitmodules --force
# Output
git submodule add --force https://github.com/tonsky/FiraCode fonts/fira
git submodule add --force https://github.com/JetBrains/JetBrainsMono fonts/JetBrainsMono
git submodule add --force https://github.com/zdharma-continuum/fast-syntax-highlighting .config/zsh/plugins/fast-syntax-highlighting
```
## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE.md) file for details.