LoginSignup
10
11

More than 5 years have passed since last update.

git-jumpですぐ編集

Last updated at Posted at 2013-12-08

元々考えていたネタがボツになってしまったので急いで書き上げました
内容が薄くてすみません…

diff-highlight

↓のエントリを見てをdiff-highlightを設定したところ、ライフがチェンジングになった人は多いのではないでしょうか。

Git の diff を美しく表示するために必要なたった 1 つの設定 #git - 詩と創作・思索のひろば (Poetry, Writing and Contemplation)

あらためて考えると、contribの中身をマジメに見たことがなかったことに気付き、軽く覗いてみることにしました。

contribの中身

環境はMacOSX、git 1.8.5.1(homebrew 利用)です

$ tree -L 1 /usr/local/share/git-core/contrib
.
├── README
├── buildsystems
├── completion
├── contacts
├── convert-objects
├── credential
├── diff-highlight
├── diffall
├── emacs
├── examples
├── fast-import
├── git-jump
├── git-resurrect.sh
├── git-shell-commands
├── gitview
├── hg-to-git
├── hooks
├── mw-to-git
├── p4import
├── persistent-https
├── remote-helpers
├── remotes2config.sh
├── rerere-train.sh
├── stats
├── subtree
├── svn-fe
├── thunderbird-patch-inline
├── vim
└── workdir

25 directories, 4 files

completion、credentialあたりはすでに使っている人も多そうですね。

軽く見てみたところ、便利そうなコマンドがありましたので、そちらを共有したいと思います。

git-jump

条件に合うファイルを即エディタで開いてくれるコマンドです

使い方

$ git jump diff # 変更があるファイルをエディタで開く

$ git jump merge # コンフリクトが起きているファイルをエディタで開く

$ git jump grep <pattern> # patternにマッチしたファイルをエディタで開く

コマンド1発ですぐエディタが開くので、探す→エディタ立ち上げという1手間が減るので便利になるシーンもありそうです。

終わりに

本当はもっとcontribの中身を調べたかったのですが、時間がなかったので1つのコマンドだけを紹介しました

他にもhttps接続を高速化するpersistent-httpsや、.git/remotesを書き換えるremotes2config.shなど、はまれば便利になりそうなツールがあるので、一度git-core/contribを覗いてみてはいかがでしょうか

次は @camelmasa さんです。

10
11
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
10
11