gitvisual-studiovisual-studio-2015hook

Git hooks in Visual Studio?


I would like to implement client-side git hook (type of commit-msg) to validate commit message. I have done a working hook - it works perfectly when using git console. But Visual Studio 2015 git build-in plugin (Team Explorer) seems not to take it into account and simply skip those hooks.

Has anyone tried to do the same with success? I read the Internet and it seems the problem is not solved, but I believie in You! :)

I want to check if commit message contain jira issue key.


Solution

  • As of writing, not possible.

    There is a feature request for that, and you can upvote it if it's important to you: https://visualstudio.uservoice.com/forums/121579-visual-studio-ide/suggestions/4321705-enable-client-side-hooks-when-committing-code-to-a