| Crates.io | vcs2git |
| lib.rs | vcs2git |
| version | 0.4.0 |
| created_at | 2024-02-21 13:48:02.867303+00 |
| updated_at | 2025-07-22 15:27:38.331948+00 |
| description | Import VCS .repos as Git submodules |
| homepage | https://github.com/jerry73204/vcs2git/ |
| repository | https://github.com/jerry73204/vcs2git.git |
| max_upload_size | |
| id | 1148070 |
| size | 202,472 |
Install the binary using Cargo.
cargo install vcs2git
This program reads a YAML .repos file and adds listed repos as submodules in the current Git repository.
Let's get started with Autoware's autoware.repos for example.
# Enter into the root of your Git repo
cd my_repo
# Add listed repos in autoware.repos as submodules under src directory.
mkdir src
vcs2git autoware.repos src
# Save added submodules
git commit
vcs2git [OPTIONS] <REPO_FILE> <PREFIX>
Arguments:
<REPO_FILE> The YAML file of a repository list
<PREFIX> The directory to add submodules
Options:
--only <REPO>... Process only these repositories
--ignore <REPO>... Process all repositories except these
--skip-existing Don't update existing submodules (by default, existing submodules are updated)
--sync-selection Remove submodules that are not in the current selection
--no-checkout Do not checkout the files in each submodule
--dry-run Preview what would be done without making changes
-h, --help Print help
# Only add specific repositories
vcs2git autoware.repos src --only universe/autoware.universe universe/external
# Process all except specific repositories
vcs2git autoware.repos src --ignore universe/external
# Remove submodules not listed in the repos file
vcs2git autoware.repos src --sync-selection
# Keep only specific repositories and remove all others
vcs2git autoware.repos src --only core/autoware --sync-selection
# Add new submodules but don't update existing ones
vcs2git autoware.repos src --skip-existing
# See what would be done without making changes
vcs2git autoware.repos src --dry-run
# Preview sync operation
vcs2git autoware.repos src --sync-selection --dry-run
This software is distributed under MIT license. Please see the license file.