search

Home  >  Q&A  >  body text

hook - Git hook, how do you write it on the server?

PHP I heard that there are 3 commands that can directly execute bash commands (exec, shell_exec, proc_open)

How do you usually execute it? Just execute git pull? , other languages ​​are also fine

伊谢尔伦伊谢尔伦2793 days ago571

reply all(1)I'll reply

  • 漂亮男人

    漂亮男人2017-05-02 09:26:05

    I usually use exec 了,git pull 的话我一般会加 -f directly to prevent modification failures on the server, although it is generally unlikely.

    reply
    0
  • Cancelreply