Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在每次提交(推送)到中央存储库之前执行命令行应用程序。如果应用程序将执行错误,则提交应该会失败并显示一些消息。
我找到了一些 python 钩子的例子,但没有关于调用 bats 或 exe。
您只需将 exe/batch 文件作为钩子的命令(您可能不需要 bat 和 exe 扩展名):
[hooks] pre-commit.example1 = /path/to/somebatfile.bat pre-commit.example2 = /path/to/someexefile.exe