Reputation: 54832
Is there a Git hook which can be executed when a new Git tag is added? Because I want to automatically write new Git tag names into a textfile. Do you have a clue on how to do this?
Upvotes: 7
Views: 3706
Reputation: 99274
While it's not currently possible using hooks, you can always create a simple script.
mytag.sh :
#!/bin/sh
[ -z "$1" ] || ( git tag $1 && git tag > /path/to/your-tags-file )
then :
chmod +x mytag.sh
git config alias.mytag !/path/to/mytag.sh
Upvotes: 4