开发者

Git Push Server doesn't update working branch

开发者 https://www.devze.com 2023-02-09 13:56 出处:网络
I want to git push server master And then have it update the files on the webserver for rapid deployment.

I want to

git push server master

And then have it update the files on the webserver for rapid deployment. But the files on the server don't get updated. There isn't a new branch oder anything. How do I get the files on the working bran开发者_C百科ch once they have arrived?

I tried putting

cd ..
env -i git reset --hard

in the post-receive hook but it doesn't seem to do anything. (Got that idea from here: http://philsturgeon.co.uk/news/2010/02/Deploying-websites-with-Git)

Help appreciated.


You should use this method instead. http://toroid.org/ams/git-website-howto It still uses a post-receive hook but had different implementation details.

Additionally what method are you using to push to the repo? If you are using HTTP instead of SSH then depending on your setup, the hooks may never be executed.

0

精彩评论

暂无评论...
验证码 换一张
取 消