git-slack-hook
git-slack-hook copied to clipboard
Working with a Locally Hosted Git
Would this work with a git repo that is hosted locally? I have this working on a server that I own but I recently started a new project that I'm working on only locally, any chance this could work that way ?
I need this as well, any help?
Hey guys yes it should work with locally hosted git as well
you just need to add it to your post commit hook in locally created git repository
Exactly. Post-recieve hooks run after a remote gets updates. Post-commit runs after each commit. For some reason, however, my post-commit is not working.
@Brendonwbrown is the hook not executing, or is the script not behaving as expected?
I'm also interested in this. I've put the whole code in post-commit
but it does not seem to start.
It neither gets inside the while
on line 311:
while read line; do
set -- $line
notify $*
RET=$?
done
there seems no line
to be read. If I add an echo test
at the beginning of the script I can see it so I know post-commit
is executed. Any suggestions? Thanks.
I think you will need to write a wrapper script to be called from either 'commit-msg' or 'post-commit' - see https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks
Yes, seems so. At this point the question is what we need to pass over to the original script, as arguments, in order to start the while loop? Thanks for feedback.
According to some other hooks: oldrev newrev refname
oldrev will be previous commit, newrev latest commit and refname will be something like refs/heads/master
Met vriendelijke groet, Jo Vandeginste