Skip to content

the-reasor/git-get

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Git get Build Status

Like go get, git-get organizes repos in directories matching the path of the clone url.

Usage

git get [email protected]:pietvanzoen/dotfiles.git will clone the project into $GIT_PATH/github.com/pietvanzoen/dotfiles.

Configuration

The following environment variables configure git get behavior:

GIT_PATH - required

Path to directory to clone into.

GIT_GET_DEFAULT_PREFIX - optional

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-get

Installation

git clone https://github.com/pietvanzoen/git-get.git
cd git-get
INSTALL_DIR=<path to directory in your $PATH> ./install

If $INSTALL_DIR is not specified it will default to $HOME/bin.

That's it! git get automatically call git-get.

Tips

  • Use git get alongside 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 }

See also

  • ghq - A more feature full approach to managing repos in a go get way. Written in go.
  • h - Combines the ideas of git get with autojump into one package. Written in python.

About

Like `go get` but `git`.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 53.4%
  • Python 46.6%