git-sync
git-sync is Run a command to all git repositories in the current directory.
### Usage ##### via Go ```shell $ go get github.com/takecy/git-sync/gs ``` ##### via Binary [Download](https://github.com/takecy/git-sync/releases) for your environment. and copy binary to your `$PATH`.
Print usage
$ gs
Usage:
gs [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.
<command> Same as git command. (fetch, pull, status...)
Options:
Same as git.
Default target directories
$ tree
.
├── .Hoge // ignore (start from comma)
├── repo_a // target
├── dir
│ └── repo_b // ignore
└── repo_c // target
#### Examples ```shell $ gs fetch --all -p ``` ```shell $ gs --target ^cool-tool pull ``` ```shell $ gs --target ^cool-tool --ignore ^wip-command pull ```
### Development ``` $ git clone [email protected]:takecy/git-sync.git $ cd git-sync $ DEBUG=* go run gs/main.go version ```
## License [MIT](./LICENSE)