This is specifically a question about Pantheon best-practice workflow, which I'm new to.

I run from a Win7 machine and do not have a full dev environment set up locally: it's just too much hassle to get Windows to play usefully and smoothly as a dev space behind my hosted *nix worlds. So, I am in the habit of developing online.

With Pantheon there is no shell access, but there is git and drush.

I don't use git because the workflow there asssumes that I want to move something off of my local repository up to Pantheon (eg, if I have a local working environment I would apply the patch, then push the patched code to my Pantheon dev), but this is not my usecase.

Using drush seems like an option, but I can't figure out how/if applying a patch is supported.


How to patch a contrib module on Pantheon given no local dev environment?

1 Answer 1


I'm not sure what you mean by moving something off of your local, but I really think your best bet is to use git and push the patch up, even if you don't have a local environment set up. You don't need a local server or database running, you're just altering code in the repo.

  1. clone Pantheon dev environment locally
  2. patch -p1 < name_of.patch
  3. commit and push

You could edit the files manually using the SFTP mode, but I wouldn't recommend that.

Using Git with Pantheon

  • Hey there Kyle, Thanks for the clue but I'm not sure what you mean. I have git on my local machine, so there is a repository, yes. I could clone the Pantheon dev which would suck everything down locally. But then how do I run the command line at your step 2? Without a local environment running, what tool is letting me navigate to a module and apply a patch? And lastly, isn't this method requiring me to bring the entire dev site local simply to patch one module? And then push it all back? Is there some clever diff business going on to ensure we're only moving the changed code?
    – boabjohn
    Commented Dec 7, 2013 at 3:02
  • 1
    @boabjohn Yes, git will only send the diff back up again, you're not pushing the whole repo around every time you push
    – Clive
    Commented Dec 7, 2013 at 3:28
  • I went ahead and made a screencast on how to use git/patch with Pantheon. I used the GitHub client because it's universal for Mac and Windows so you can try it out. Just like @Clive said, it's just pushing pieces. Uhh... just realized I didn't record audio. Whoops. :) Commented Dec 7, 2013 at 3:28
  • Hey guys this sounds (or will sound?) great: I've just freshened up my local git set up and am cloning the site now. So I'll be ready for your tutorial soon!
    – boabjohn
    Commented Dec 7, 2013 at 3:38
  • 1
    Alright, I made a new screencast with audio updated in the answer, let me know if it helps. Commented Dec 7, 2013 at 6:56

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.