git windows post pull

前端 未结 2 462
無奈伤痛
無奈伤痛 2021-01-16 09:18

I have recently converted from svn. My server is under Windows (don\'t blame me, it wasn\'t my choice :}

I have created a repo with two branches \"master\" and \"sta

2条回答
  •  被撕碎了的回忆
    2021-01-16 09:46

    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.

提交回复
热议问题