8
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

git のcommit/merge/checkoutなどのタイミングでctagsを実行するフックスクリプト

8
Last updated at Posted at 2013-05-16

.git/hooks 配下に以下のようなスクリプトを post-commit というファイル名で作成。実行権限を与える。

.git/hooks/post-commit
# !/bin/sh
/usr/local/bin/ctags -f tags -R `pwd`
echo "*** Update tags by git hook script."

同様の内容で、post-merge, post-checkout という名前でファイルを用意する。

注意

mac の場合 brew install ctags でインストールすること

参考: Vim - ctagsと連携するように環境を構築する - Qiita

参考

8
8
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
8
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?