我有一個 git 鉤子,“commit-msg”它看起來像:#!/bin/shpython .git/hooks/Foo.py在我的 Foo.py 里面我有:import git# doing some stuff based on git (evaluating latest changes)當我使用 sourcetree 提交時,如果無法運行鉤子(它也不提交)//... Traceback (most recent call last): File ".git/hooks/Foo.py", line 2, in <module> import git ImportError: No module named git//...但如果我直接從終端提交,則掛鉤按預期工作。有什么建議可以修復源樹上的提交嗎?
添加回答
舉報
0/150
提交
取消