cgit is a utility that acts as a wrapper around git clone, allowing you to organize project folders in a reverse domain-like structure.
Assuming you have a repository at https://gitsite.com/username/repo-name.git, you can use cgit as follows:
cgit https://gitsite.com/username/repo-name.gitThis command is equivalent to:
git \
clone \
https://gitsite.com/username/repo-name.git \
com.gitsite.username.repo-name/repo_nameThe format of th above commands is as follows:
git \
clone \
<repo url> \
<repo reverse domain folder>/<repo name>cgit is also compatible with repositories in the format: git@gitsite.com:username/repo-name.git.
To use cgit, follow these steps:
-
Install Rust.
-
Globally install the
cargo-run-scriptRust crate:cargo install cargo-run-script
-
This will install the
cgitexecutable globally in the/usr/local/bindirectory:cargo run-script install
-
After installation,
cgitshould be available in a new terminal session.