I’m a Git beginner with workflow questions. I’ve learned lots of commands, and I know how things work, but I can’t seem to figure out the right workflow. Love to have some suggestions. [Note, I’m the only developer working on my projects]
-
A friend once told me that it was best to work on the live server rather that on localhost to avoid running into environment specific issues. This true?
-
I use the same base theme for all of my Drupal sites. When I make a change in one, I currently need to copy and paste it to about 10 other places. Is there a way keep this base theme in one place and have other sites draw from it? Github maybe?
-
If I want to do a ‘complete’ backup of the codebase and the database – the only way to do this is to export the database as a sql file and commit the whole thing?
Thanks for the help!
Terry
In general, you should run testing on a server as close to the production server as possible, but not the actual live server, as that’ll break a live site during testing. Because Drupal is designed to run well on a variety of servers, using similar servers isn’t as relevant.
You should use git pull instead of copy-paste. Because git has a decentralized designed, you don’t really need a central location like github. If that’s useful for your workflow, use it, but if not, you can pull directly from one server to another.
There’s not a great solution to Drupal storing so much configuration information in the database and keeping that synched. Syncing your entire database is one approach. Many modules also have exportables, which basically save data from the database into code so you can sync it along with the rest of your code. Features is probably the simplest way to experiment with the exportable model and see if that works for you.