Git deploy to staging server using post-receive hook

preview_player
Показать описание
Setup a post-receive hook that will automatically catch updates coming into your git repo and push them to your web root to serve live web pages.
Рекомендации по теме
Комментарии
Автор

Please note that the document root (GIT_WORK_TREE in your post-receive hook) doesn't need to be initialized as a git repo. In fact, there is no point in doing so, as you are never using it as a repo anyway.

edgarbonet
Автор

Great insightful short video of maximal value! Thank you very much and God bless

ashimov
Автор

Thank you, You have given useful information about hooks to get pulled to repo clone directory. But I used my smart way to listed your voice :D :D :D, thanks.

UmeshGaire
Автор

Unfortunately this worked somewhat, but when I stated adding new image files the files would get pushed to the remote, but wouldn't get sent to the apache side resulting in broken images

drewdrew
Автор

Why the first repo (myproject.git) was created bare?

pkaramol
Автор

Thanks for the tutorial. Worked ok. Got everything setup, connection etc. But on initial push I got a permission error on post-receive. After fixing, now everytime I push I get Everything up-to-date ... How do I tell git it is wrong!

ShannonWhitty
Автор

Eric - this was on git 2.x. I'm not 100% sure of the exact version at the time of that video, but I am sure it was at least 2.

nettleyconsulting
Автор

How would you set up the workflow for multiple local developers, a central remote gitlab server (for dr purposes), a staging and a production server?

ThePaulius
Автор

Great tutorial! Simple and clear. 
Unfortunately I don't got the post-receive hook, in the hooks folder. 
I tried to make the file myself and made it executable, but it dosen't looks like it's getting fired, when pushing from localhost.

Any idea why the post-receive hook is missing by default?
I'm using git version 1.7.10.4 on my host server.

thomasolsson
Автор

What about ownership and permissions? Are the files owned by git and 644?

glennstruzinski
Автор

what about? local server to github to cpanel?

mel-
Автор

Are you working in git 2.x or an older version?

DTmishine
Автор

your english accent is difficult to understand

techocean