GitHub for Windows Pre-Commit Hook

前端 未结 4 983
你的背包
你的背包 2021-01-05 01:38

We have a development team that is using a 50/50 split of GitHub for windows and Bash shell for their Git management.

We have implemented a pre-commit hook (designed

4条回答
  •  梦毁少年i
    2021-01-05 02:19

    Adding an answer as the currently selected answer is no longer the case. I was able to write a pre-commit hook that works across GitHub Desktop for Windows, SourceTree for Windows, and Git Bash for Windows.

    I'm not sure if it's a hard requirement for windows commit hooks, but I included an exact reference to sh.exe like so:

    #!C:/Program\ Files/Git/usr/bin/sh.exe
    

    And it runs fine!

提交回复
热议问题