Calling 'git pull' from a git post-update hook

前端 未结 4 652
误落风尘
误落风尘 2020-12-02 13:44

I have a central git repo set up using gitolite.

I want to set up a hook such that whenever a user pushes to the repo, it performs a pull elsewhere followed by some

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-02 14:09

    How about specifying the --git-dir.

    #!/bin/sh
    cd /home/git/www/epicac
    git --git-dir=.git pull
    

提交回复
热议问题