The best (git) clone, more skilled than all the rest.
- Clone repos into a configurable project directory, i.e.
{project_dir}/{host}/{user}/{repo}
- Accept any HTTP(S) or SSH repo URL, extract
host
,user
, andrepo
. - Use a preferred git scheme, configurable per host, i.e. SSH when given a HTTPS URL.
- Support host, user remapping, i.e.
github.com => hub
,gitlab.com => lab
. This makes shortened paths in shells likefish
still be useful, for example:- No host remapping:
projects/github.com/user/repo => p/g/u/repo projects/gitlab.com/user/repo => p/g/u/repo
- With host remapping:
projects/hub/user/repo => p/h/u/repo projects/lab/user/repo => p/l/u/repo
- No host remapping:
- Optionally
cd
into the repo after clone. - Optionally run commands in the repo after clone, i.e.
tmux
,nix develop
,mr register
These projects do something similar, but they're not good enough for me.
Project | Compliments | Criticism |
---|---|---|
git-get | git-config support | Not flexible enough |
myrepos | very flexible | Can't clone unknown repos |
ghq | supports host dir map, cd via --look , ssh via -p |
can't map ssh hosts, no commands after cd |