0

I am trying to wrap my head around a proper workflow (Dev, Test, Live) using Git with Drupal.

So initially, things are easy when the live site does not exist yet and we are only in development. So the developers develop a new site creating nodes, creating content types, uploading images for use in nodes, configuring Drupal settings, creating the theme etc. When all looks good, we can push everything (code and dB) to the test server and have a product owner check it out. If something is not right, we fix it on dev and then again push everything to test. When we are happy with our new site and its ready to go live, we push everything from test to live. BUT, this is where things get confusing. I have read that the proper Git workflow is that code only moves upstream and data (database and sites/default/files) move downstream. So this is fine if I am only working on custom modules on dev or maybe install a new contributed module on dev and need to push that code upstream, but what about actually creating new content? What if one of the developers is tasked with creating a new page on dev that consists of a new menu entry in the menu and contains some images that got uploaded to /sites/default/files/images via IMCE or from an actual image upload field in the custom content type? None of this is in code which can then be pushed upstream using Git. I know there is the Features module which can handle things like configuration settings, views, content types etc, but what about actual content and the supporting images? How do you get new content and images UP to test and live when /sites/default/files can never go upstream and there is no way to put content into code? Do you ONLY create new content on the live server once the site us up? Do you create it on dev and then create it AGAIN on test and then once AGAIN on live?

I'm just trying to figure out once a site is live, how developers continue creating new sections of websites with new content and push it live.

Thanks in advance.

2 Answers 2

2

As you have noticed, content moves downstream: so while code moves dev -> test -> live, content can move only live -> test -> dev, live -> test or live -> dev.

You want to create content only on live site - if desired - using drafts or other features which hide unfinished content from the users.

Usually you don't need the same content in dev/test, because these sites are meant for code quality testing - you shouldn't concern yourself with keeping live, test and dev contents synchronized.

0
-1

You can refer the concepts of branching in GIT u can maintain the different branching for different environments refer this link http://git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.