Skip Git commit hooks

前端 未结 3 1764
长情又很酷
长情又很酷 2020-11-27 08:55

I\'m looking at a git hook which looks for print statements in Python code. If a print statement is found, it prevents the git commit.

I want to override this hook

3条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-27 09:45

    From man githooks:

    pre-commit
    This hook is invoked by git commit, and can be bypassed with --no-verify option. It takes no parameter, and is invoked before obtaining the proposed commit log message and making a commit. Exiting with non-zero status from this script causes the git commit to abort.

提交回复
热议问题