- I understand your friend’s point, but I strongly disagree with the launched (possibly erroneous, possibly) broken development code on the production server. Better load VirtualBox and configure the virtual machine with the same configuration as the server on which you are deploying. Use git to create “tags” for each version that you deploy so that you have useful guidelines for the “versions” of your site.
- Take a look at the "git submodules". You almost certainly need to find out what it is, but if you come from a disruptive background, you will probably find them very confusing. Submodules mostly reference other repositories, so you have a programmatic link to another project inside your main project. However, they must be autonomous in the directory.
- I personally like to store the schema.sql file in my repository (just an empty SQL schema), but I don’t think that keeping your full database backups in the repository would be wise, although you can. Store these separately.
If you're new to the whole idea of version control systems, you're probably better off just jumping with both legs. Everything will start to make sense when you go. And, of course, by its very nature you are unlikely to do any permanent damage, as you can roll back and forth.
One firm recommendation: fix often. Every time you make changes that work, make. Smaller fixations are much easier to handle than larger ones. For example, if you need to undo a broken change, you will most likely be able to undo it without deleting a bunch of working code that was committed at the same time if your commits are atomic.
d11wtq
source share