Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git "Live Server" Best Practices

Tags:

git

workflow

live

My partner and I have been dabbling with the idea of pushing and pulling from a repo that affects files viewable by the general public as opposed to storing the repos in a hidden location and just FTPing files when we feel they're good to go. While being able to directly push to the "live site" would be extremely convenient, I'm wondering what negative repercussions (if any) this would incur.

Thanks a lot!

like image 865
JoeQuery Avatar asked Mar 30 '11 18:03

JoeQuery


1 Answers

I would recommend pulling rather than pushing if going this route.

Always pull the finished product and do not do merges on the live server, for if there are conflicts you will be scrambling to fix them. Do all your merging, etc on your testing environment. Once all is good there, push the finished results to your 'bare' repo for the production branch and then from the production machine git pull from it.

Yes it could be another point of failure however I think the benefits outway the cons.

like image 99
RDL Avatar answered Sep 25 '22 16:09

RDL