Skip to content

takecy/git-here

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

git-here

git-here(gih) is Run git command to all repositories in the current directory.


unittest Go Report Card GoDoc

Open in Visual Studio Code


Usage

$ gih --timeout 60s pull
$ gih fetch --all -p
$ gih --target ^cool-tool pull
$ gih --target ^cool-tool --ignore ^wip-command pull

Default target directories

$ tree
.
├── .Hoge        // ignore (start from comma)
├── repo_a       // target
├── dir
│   └── repo_b   // not target
└── repo_c       // target

Install

via Go

$ go install github.com/takecy/git-here/gih@latest

via Binary

Download from Release Page for your environment.
and copy binary to your $PATH.

Print usage

$ 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.

Development

  • Go 1.19+

Why this repository have vendor?

It is to simplify development. You can start right away just by cloning.

Prepare

$ git clone git@github.com:takecy/git-here.git
$ cd git-here
$ DEBUG=* go run gih/main.go version

Testing

$ make test

License

MIT