I am absolutely new to git. I'm the sole developer on a fairly large project and want to start keeping a history of code changes moving forward.
I current have a LAMP stack with many virtual hosts in Apache. To begin, I want to focus on my main site which has a development and production stack. Currently, I have two virtual hosts:
- dev.mydomain.com
- mydomain.com
I work exclusively in the dev.mydomain.com virtual host. I can browse to dev.mydomain.com any time to see my changes in real-time. When I'm comfortable with my changes, I run a bash script to push my changes to production.
sudo rsync -avh --delete --stats --progress /var/www/dev.mydomain.com/ /var/www/mydomain.com/ --exclude-from '/usr/local/bin/exclude.txt'
I want to imitate this idea using git.
- Do I install git on the actual web server which is running the sites?
- How can I configure git so I as I work on the site, I can still access those changes in real-time at dev.mydomain.com?
I have read over most getting started git tutorials and I understand the basic commands to get started but it's important I keep my same production cycle. Is there a way to achieve that or is there another way that is similar?
Aucun commentaire:
Enregistrer un commentaire