LoginSignup
2
1

More than 5 years have passed since last update.

tigでローカルにチェックアウトした全てのbranchをツリー表示する

Posted at

やりたいこと

  • ローカルにチェックアウトしてあるbranchをtigで一括でみたい
  • 引数に複数のブランチを指定すれば可能だけど、めんどくさい

環境

  • CentOS6.7 x64
  • Linuxbrewで入れたtigを利用。
$ tig -v
tig version 2.1.1

コマンド

引数としてgit branchした結果を渡す
先頭の*が邪魔なので、tr -dで削除する

tig `git branch | tr -d ' *'`

xargsとかではpagerが起動してうまくいかず、
結局上記で落ち着いた。

あとはaliasに登録するなりなんなり

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1