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

t a great blog .I will be

I was curious if you ever

I was curious if you ever considered changing the layout of your site? Its very well written; I love what youve got to say. But maybe you could a little more in the way of content so people could connect with it better.You’ve got an awful lot of text for only having one or 2 pictures. Maybe you could space it out better?
learn to inject Botox online
http://akne-lecba.info/botox-blog/

Add new comment | Penyaskito Blog

Its likee you read mmy mind! You seem to know a lot about this, like you wrote the blok in it or something.
I think that you coyld do with some pics to drive
the message home a little bit, but instead of that, this is wonderful blog.
An excellent read. I'll definitely be back.

Here is myy wweb blog ... sexual misconduct training course ( Melba -
http://www.futaiji.com/space.php?uid=60866&do=blog&id=141784 )

Add new comment | Penyaskito Blog

Undeniably imagine that that you stated. Your favorite justification seemed to be at the
net the easiest factor to keep in mind of. I say to you, I certainly get irked at thee same time as folks think abouut issues that
they just do not realize about. You managed to hit the nail upon the highest and defined out the whole thing withbout
having side-effects , people can take a
signal. Will likely be back to get more. Thanks

my pasge :: <a href="http://vasrc.kau.ac.kr/index.php?mid=center_news&document_srl=427853">ph... nz</a>

Add new comment | Penyaskito Blog

Hmm it appears liie your site ate my first comment
(it was extremely long) soo I guess I'll just sum it upp
what I sjbmitted and say, I'm thoroughly enjoying your blog.
I too am an aspiring blog bligger but I'm still new to the whole thing.
Do you have any suggestions for first-time blog
writers? I'd certainly appreciate it.

Take a look at my web-site :: sports trrader review, <a href="http://khatgozar.com/ActivityFeed/MyProfile/tabid/60/userId/311868/langu...,

Add new comment | Penyaskito Blog

I know this if off topic but I'm looking into starting my own blog
and was curious what all is required to get setup?
I'm assuming having a blog like yours would cost a pretty penny?
I'm not very internet smart so I'm not 100% sure. Any suggestions or advice would be
greatly appreciated. Many thanks

Feel free to surf to my homepage :: situs judi slot online pulsa (<a href="https://wikibible.org.il/index.php/User:TraceyGovan">https://wikibible.o...)

Pages

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.