Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
新しい Git タグが追加されたときに実行できる Git フックはありますか? 新しい Git タグ名を自動的にテキスト ファイルに書き込みたいためです。これを行う方法についての手がかりはありますか?
現在フックを使用することはできませんが、簡単なスクリプトをいつでも作成できます。
mytag.sh :
#!/bin/sh [ -z "$1" ] || ( git tag $1 && git tag > /path/to/your-tags-file )
それから :
chmod +x mytag.sh git config alias.mytag !/path/to/mytag.sh