Is it possible to use GIT hooks in .git/hooks/ with Stash?
It would like to know if I can write a simple shell script for the post-receive hook to be run by the server on a git push. It should check out a branch to a webserver.
I was not able to find a word on this anywhere.
Thanks in advance, regards from munich
Sorry for butting in...is there more in depth documentation on this subject somewhere?
Some specific questions off the top of my head:
I can probably work around things in various ways, but in case there are existing ways to achieve them, it'd be nice(r)...
There isn't really any documentation about managing raw Git hooks, possibly because it's not necessarily something Stash wants to encourage.
1. I believe you should be able to add them to the global Git templates directory, which is used when new Git repositories are created in Stash. I would recommend using symlinks to the actual script so that when the file is _copied_ it will be a copy of the symlink and not the actual file (which will then get out of sync).
2. Not at the moment. This is something that's a more general problem for most of the repository settings, not just hooks. This might be a good feature request to follow:
3. Again, not at the moment. Your best bet would be to use our REST api from a local script:
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot