13
11

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するたびSEを流す

Posted at

前にどっかで読んだような気がしたんだけどな〜?

Gitは管理ディレクトリ下の.gitの下にhooksてディレクトリがあって,そこでcommit前とか後とか,色々なイベントごとに起動させるスクリプトを定義できる.フックできるイベントは公式ページ参照.

以下手順.

  1. どっかから好みのSE(効果音)を拾って来る.
  2. .git/hooks/post-commit にSE再生のスクリプトを配置する.
  3. post-commit にchmodで実行権限を付加する.
  4. コミットするたびしあわせなきぶんになる.

post-commitの例

post-commit
# !/bin/sh
afplay ~/Music/se/coin.mp3

いじょ.

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?