git get
clones repositories to your GETPATH
in the same fashion as go get
.
Get a repository to the default GETPATH
~/src
$ git get github.com/arbourd/git-get
~/src/github.com/arbourd/git-get
$ git get https://github.com/arbourd/git-get.git
~/src/github.com/arbourd/git-get
$ git get [email protected]:arbourd/git-get.git
~/src/github.com/arbourd/git-get
Set a custom GETPATH
with git config
.
$ git config --global get.path "~/dev"
$ git get github.com/arbourd/git-get
~/dev/github.com/arbourd/git-get
Set a custom GETPATH
with the environmental variable $GETPATH
.
$ export GETPATH=~/dev
$ git get github.com/arbourd/git-get
~/dev/github.com/arbourd/git-get
By default, when getting a repository without specifying a protocol (eg: github.com/arbourd/git-get) HTTPS will be used.
If you would prefer to use SSH or any other protocol, configure your Git config to redirect.
$ git config --global url.ssh://[email protected]/.insteadOf https://github.com/
Install with brew
.
$ brew install arbourd/tap/git-get
Install with go install
.
$ go install github.com/arbourd/git-get@latest