I have being developing web application for well over 4 years now, and am used to the regular workflow of
- Build on local machine
- FTP to live server
- Make changes and FTP again to the live server
This pattern is becoming a bit of a pain, because I sometime forgot the files I worked on.
I’ve been seeing alot about using GIT for deployment. I’ve used basic GIT with GitHub; commiting and cloning.
Am a bit lost as to how to use GIT for deployment.
I currently have access to a centos VPS server which am using for my current project.
How i can incorporate GIT into my workflow to make deployment a bit painless.
Thanks
Git is a versioning tool – not a deployment tool. There are conventions in Git which support good deployment practices, such using the master branch for maintaining live code, but it is purpose is to provide source control for your code. Pushing code into production (or any environment) requires different tools.
You can look at tools such as WebDeploy or Rake if you are looking to automate your deployments. These are completely separate from git.
If you are looking to reduce the number of steps in your deployment having switched to git, you could look at AppHarbor. All that is required to deploy your code is a ‘push’ to the AH repository.