Like go get, git-get organizes repos in directories matching the path of the clone url.
git get git@github.com:pietvanzoen/dotfiles.git will clone the project into $GIT_PATH/github.com/pietvanzoen/dotfiles.
The following environment variables configure git get behavior:
Path to directory to clone into.
Configure a default prefix for cloning.
E.g: This will clone the repo https://github.com/pietvanzoen/git-get.git:
export GIT_GET_DEFAULT_PREFIX=https://github.com/
git get pietvanzoen/git-getgit clone https://github.com/pietvanzoen/git-get.git
cd git-get
INSTALL_DIR=<path to directory in your $PATH> ./installIf $INSTALL_DIR is not specified it will default to $HOME/bin.
That's it! git get automatically call git-get.
- Use
git getalongside autojump to effortlessly navigate your folder structure. - Clone and change directory in the same command. Add this to your shell environment files:
gg() { dir="$(git get $1)"; [[ -n "$dir" ]] && cd $dir }