Many questions have been posted on this subject and I've been reading through them extensively for the past couple days. My concern is specific.
Here's what I was doing before git:
- I run a PHP/MYSQL website
- I develop locally and test on WAMP
- I FTP to a staging site dev.mywebsite.com
- Once I'm happy with all the changes, I FTP to the live site
When I decided to start using Git:
- I initialized a bare repo on my hosting server
- Created a post-receive hook to deploy to dev.mywebsite.com
- I cloned the dev.mywebsite.com repo to a my local dev machine
- I test code -> commit -> push to remote (dev site)
Here are my questions:
1) There are a few files that I need them to remain different on local vs remote (these are mainly config files). I am using --assume-unchanged for these files. However, I read that doing 'git reset' would undo these so my first question: - Is there a better way to never change the config files when I push from local to remote?
2) My workflow ends with me pushing to the dev site. I am not sure how to proceed from there, and deploy my code to the live website in the most efficient and risk free way.
*3) A bonus question: Should I integrate github/bitbucket/etc.. into my workflow?
Thank you
Aucun commentaire:
Enregistrer un commentaire