Skip to content
Clone git repositories into namespaced directories like go get
Branch: master
Clone or download
Latest commit 004dd18 Mar 21, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
.idea
.gitignore
.goreleaser.yml
LICENCE
README.md
git-get.1
go.mod
go.sum
main.go
main_test.go

README.md

CircleCI

git-get

Clone git repositories into namespaced directories like go get

Example

$ export GITPATH=$HOME/git
$ git get https://github.com/golang/go.git
Cloning into '/Users/yijiayu/git/github.com/golang/go'...
...
$ git get https://github.com/yi-jiayu/bus-eta-bot.git
Cloning into '/Users/yijiayu/git/github.com/yi-jiayu/bus-eta-bot'...
...
$ git get https://gitlab.com/yi-jiayu/bus-eta-bot.git
Cloning into '/Users/yijiayu/git/gitlab.com/yi-jiayu/bus-eta-bot'...
...
$ tree -L 3 $GITPATH
/Users/yijiayu/git
├── github.com
│   ├── golang
│   │   └── go
│   └── yi-jiayu
│       └── bus-eta-bot
└── gitlab.com
    └── yi-jiayu
        └── bus-eta-bot

10 directories, 0 files

Installation

git will make any executable prefixed with git- on your $PATH available as a git subcommand, so you will be able to run git-get as git get once it is on your $PATH.

Binary downloads

Download a precompiled binary for the latest release for your system from the Releases page and put it on your $PATH.

Homebrew

Users on MacOS can use Homebrew:

brew install yi-jiayu/tap/git-get

From source

With a working Go toolchain:

go build -o ~/bin/git-get

Replace ~/bin with any directory on your $PATH.

Git URL support

  • GitHub
  • GitLab
  • Generic
You can’t perform that action at this time.