Much like this image, the tool is under construction.
Build & Releases | ||
🚀 | 🚀 | |
🧪 | 🧪 | |
🔐 | 🔐 |
The CLI is intended to make dealing with multiple connected repositories easier, by grouping repositories and running git commands across them all.
To install or update on Linux or MacOS, you can download from releases or run:
curl -s -L https://raw.githubusercontent.com/git-jock/git-jock-cli/main/scripts/install.sh | bash
/usr/local/bin
and you should check the script before
execution.
Repositories and groups must be configured in ~/.jockrc
, in YAML format like below.
Imports can be added with an address, and imported using jock -i/--import-config
repositories:
auth-service:
address: git@github.com:some-startup/authentication-service.git
location: /home/jock/git/authentication-service
shared-entities:
address: git@github.com:some-startup/shared-entities.git
location: ~/shared-entities
...
user-service:
address: git@github.com:some-startup/user-service.git
location: ../users
groups:
services:
repositories:
- auth-service
- user-service
imports:
my-org:
address: git@github.com:my-org/local-shop-main.git
data:
repositories:
parent-pom:
address: git@github.com:my-org/parent-pom.git
location: ~/git/my-org/parent-pom
email-service:
address: git@github.com:my-org/email-service.git
location: ~/git/my-org/email-service
groups:
java:
repositories:
- parent-pom
- email-service
address
is the remote git addresslocation
is the local location, can be relative to home or absolute
jock [OPTIONS] COMMAND [ARGS]
where [OPTIONS]
are for jock, COMMAND
is the supported git command, and [ARGS]
(including flags) are passed to the git COMMAND
.
jock -g services clone
clones from gitaddress
into the specifiedlocation
for each repo within the services groupjock -r auth-service -r user-service pull
pulls into thelocation
folders for each repojock -g services branch --show-current
prints the current branch of each repo within the services group
Usage: jock [OPTIONS] COMMAND [ARGS]...
Options:
--version Show the version and exit.
-r, --repository TEXT Repository, specified in ~/.jockrc, you wish to run
commands on. Multiple repositories can be specified
using multiple flags.
-g, --group TEXT Group of repositories, specified in ~/.jockrc, you
wish to run commands on.Multiple groups can be
specified using multiple flags.
-i, --import-config Import (or reimport) remote configs.
--help Show this message and exit.
Commands:
add branch checkout clone commit fetch pull push reset restore rm switch
- OPTIONS can be
--version
,--help
or a list of repositories such as-r git-jock-cli
or--repository some-service
- COMMAND is any of the currently supported git commands:
add
,branch
,checkout
,clone
,commit
,fetch
,pull
,push
,reset
,restore
,rm
,switch
, ortag
- ARGS are git arguments passed directly to the git command
This is a loose roadmap to explain where the tool will end up, the versions & functionality against them are open to changes.
- Filtering on branch names
- Terminal sessions
- ???
Feel free to suggest feature requests in the issues.
That's Jock at the top, he's good at fetching, pulling etc. and I wish I could clone him. So it's a natural fit.