Can I use git to manage a Drupal-managed website?
that's what we do in conjunction with http://drupal.org/project/features , bugs aside it works well but what you want in code and what you want in the DB will vary from page to page and feature to feature so often just manually redo stuff (in dev env and then again in production) because deploying changes by code is more effort then its worth.
Using git to manage a website
11–20 of 52 posts
Re: Using git to manage a website
#12Re: Using git to manage a website
#13Earlier quoted context omitted.
Why not? Were I work we use Drupal almost exclusively and use Git for everything.
Isn't the content stored in a database rather than static pages? Do you do regular commits of your database files?
Re: Using git to manage a website
#14Is it bad, that I simply SSH into the server and do a "git pull"?
To elaborate on dolinsky and the article, if your web server is doing a "git pull", it means it has ssh access into your workstation. If someone breaks into your web server, this means that they have ssh access into your workstation as well by simply using the keys on your web server. This is bad, very bad. If you push to your web server, only your public key is exposed if your web server is compromised.
I'd still recommend pushing to a server though.
Re: Using git to manage a website
#15Earlier quoted context omitted.
that's what we do in conjunction with http://drupal.org/project/features , bugs aside it works well but what you want in code and what you want in the DB will vary from page to page and feature to feature so often just manually redo stuff (in dev env and then again in production) because deploying changes by code is more effort then its worth.
Managing the codebase is straightforward -- that's what git's designed for. My question was more about the actual site contents, which will reside in the database. Can you use git for tracking changes to the contents?
not always, often stuff is stored in the db that we want to work on in dev then deploy to production.
but it would be nice to be able to export a selection of nodes to code and preserve there id's, content and metadata. maybe you'll find a features contrib mod http://drupal.org/taxonomy/term/11478 but i've never heard of one.
Re: Using git to manage a website
#16Earlier quoted context omitted.
that's what we do in conjunction with http://drupal.org/project/features , bugs aside it works well but what you want in code and what you want in the DB will vary from page to page and feature to feature so often just manually redo stuff (in dev env and then again in production) because deploying changes by code is more effort then its worth.
Managing the codebase is straightforward -- that's what git's designed for. My question was more about the actual site contents, which will reside in the database. Can you use git for tracking changes to the contents?
Re: Using git to manage a website
#17I see this strategy removes the need for a second repo on the server. Other than removing a layer which would save space and lower the likelihood of errors in general are their significant pros/cons to either method.
Re: Using git to manage a website
#18Re: Using git to manage a website
#19Living on the cloud has never been so easy :-D
Re: Using git to manage a website
#20I use Fabric with mercurial to achieve a similar effect typing "fab prod deploy" - see Steve Losh's blog posts or bitbucket.org/kevinburke/goodmorningcmc