git windows post pull

回眸只為那壹抹淺笑 提交于 2019-12-01 12:20:34

Few points:

  • Make sure you have git.exe on path. Do a where git and you must get something like

    C:\Program Files (x86)\Git\bin\git.exe
    

    If git.cmd is being used ( from C:\Program Files (x86)\Git\cmd\git.cmd ), you have to do call git pull for it to continue execution. I would say add git.exe to path and start using it.

  • Even on Windows, you must have the shebang - #!/bin/sh for the hooks to properly run.

  • If you want a hook to run on pull, you probably want to use the post-merge hook. post-receive and post-update run on remote repos when you push to them.

git is probably a batch wrapper around the real executable. Use call git pull.

And those hooks only fire when content is pushed from a remote location, as far as I can tell from the documentation. So they're ignored for pull.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!