LoginSignup
5
5

More than 5 years have passed since last update.

Gitのpost-receive(サーバーサイドフック)でpullして更新

Posted at
hooks/post-receive
#!/bin/sh
cd /path/to/dir
git pull origin master
touch tmp/restart.txt

更新されない

hooks/post-receive
#!/bin/sh
cd /path/to/dir
git --git-dir=.git pull origin master
touch tmp/restart.txt

更新された


参考
http://stackoverflow.com/questions/19242401/git-hook-post-receive-with-git-pull-runs-well-via-command-line-but-returns-e
http://nullnote.com/web/git/git-auto-pull/

5
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
5