@peccul is peccu

(love peccu '(emacs lisp cat outdoor bicycle mac linux coffee))

git-runで複数リポジトリにまとめてgitコマンドを実行する

github.com

概要

複数リポジトリに対してまとめてgit statusを実行したり、各リポジトリに任意のコマンドを実行することができます。

使い方

% gr +@work path/to/repo path/to/some/repo
% gr @work status
path/to/repo        Clean                     @work
path/to/some/repo   2 modified                @work

@workの部分は好きに名前をつけられます。補完もあります。複数の名前があればgr statusでまとめてstatusを見ることもできます。

コマンドのインストール

npm(Node.js)を入れてnpmで入れる。

npm install -g git-run

補完のインストール

% echo 'which gr >/dev/null && . <(gr completion)' >> ~/.zshrc