Git workflow with submodules for Drupal deployment

Maybe you've seen the great article on Drupal Deployment with Git Submodules, by Randy Fay. I manage this site using that strategy, but some times I forget how every operation is done. So here I'm collecting them for my own reference.

For fetching all the new info from submodules: 


git submodule foreach git fetch origin 

Now we go into each module folder and use:


git pull 

If we wanted to switch to a different branch, we should use:


git branch -a # we see the available branches 
git checkout 7.x-2.x # the different branch 

For commiting it, we go back to the contrib folder and do:


git add contrib-module-name 

At the end, we use:


drush updb --debug -y 

Maybe we see some warnings because of unresolved dependencies. In that case, add the new submodule:


git submodule add --branch 7.x-1.x git://git.drupal.org/project/entity.git sites/all/modules/contrib/entity 

Finally, updating core:


git merge drupal/7.x drush updb --debug -y 

Ok, so we've done this on our DEVELOPMENT site. If everything is OK, now it's time to update the server, after doing a backup:


git pull
git submodule update --init 
drush updb --debug -y

Tags: 

Comments

Considerably, this post is

Considerably, this post is really the sweetest on this notable topic. I harmonise with your conclusions and will thirstily look forward to your incoming updates. Saying thanks will not just be sufficient, for the phenomenal clarity in your writing. I will directly grab your rss feed to stay informed of any updates. Admirable work and much success in your business dealings!  Please excuse my poor English as it is not my first tongue.
misterveiling centenveiling nederland
http://www.nexopia.com/users/centenveiling3/blog/1-is-er-een-centenveili...

This is a smart blog. I mean

This is a smart blog. I mean it. You have so much knowledge about this issue, and so much passion. You also know how to make people rally behind it, obviously from the responses. Youve got a design here thats not too flashy, but makes a statement as big as what youre saying. Great job, indeed.
domki ostrowo
http://www.bliskomorza.pl/

Hi webmaster, commenters and

Hi webmaster, commenters and everybody else !!! The blog was absolutely fantastic! Lots of great information and inspiration, both of which we all need!b Keep 'em coming... you all do such a great job at such Concepts... can't tell you how much I, for one appreciate all you do!
domki letniskowe nad morzem
http://www.bliskomorza.pl/

Terlahir untuk memenangkan

Terlahir untuk memenangkan sejumlah http://www.kutembak.com/2012/01/kata-kata-mutiara.html nan cantik yang begitu indahnya http://www.kutembak.com/2013/05/puisi-cinta-romantis-yang-indah.html pun tak kalah harum dalam nyata http://www.kutembak.com/2012/08/cerita-lucu.html membuat tertawa orang yang membaca dan ini pun http://www.kutembak.com/2013/04/kata-kata-lucu-gokil.html yang pasti akan menceriakan anda dimanapun berada dinegeri yang indah ini.

Hello there! I know this is

Hello there! I know this is kind of off topic but I was wondering which blog platform are you using for this site? I’m getting fed up of WordPress because I’ve had problems with hackers and I’m looking at options for another platform. I would be fantastic if you could point me in the direction of a good platform.
best payday loans lenders
http://omni-loans.co.uk

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
To prevent automated spam submissions leave this field empty.
By submitting this form, you accept the Mollom privacy policy.