git-here(gih)
is Run git command to all repositories in the current directory.
$ gih --timeout 60s pull
$ gih fetch --all -p
$ gih --target ^cool-tool pull
$ gih --target ^cool-tool --ignore ^wip-command pull
$ tree
.
├── .Hoge // ignore (start from comma)
├── repo_a // target
├── dir
│ └── repo_b // not target
└── repo_c // target
$ go install github.com/takecy/git-here/gih@latest
Download from Release Page for your environment.
and copy binary to your $PATH
.
$ gih
Usage:
gih [original_options] <git_command> [git_options]
Original Options:
--target Specific target directory with regex.
--ignore Specific ignore directory with regex.
--timeout Specific timeout of performed commnad during on one directory.
5s, 10m...
Commands:
version Print version. Whether check new version exists, and ask you to upgrade to latest version.
<command> Same as git command. (fetch, pull, status...)
Options:
Same as git.
- Go 1.19+
It is to simplify development. You can start right away just by cloning.
$ git clone git@github.com:takecy/git-here.git
$ cd git-here
$ DEBUG=* go run gih/main.go version
$ make test