Do you use git topic branches with the Pantheon developer portal?

Not applicable

I love git and I'm used to the git flow and topic branches model. In this model any new changes are done on a new branch. You then create a pull request when your code is good and ready to merge into (master, develop or some other branch). Does this method work well with the Apigee developer portal as hosted by Pantheon?

From reading the current documentation, it seems to encourage people to just commit to master while they develop or fix bugs. In git that is not a best practice and usually discourage when working on teams.

Solved Solved
1 8 450
1 ACCEPTED SOLUTION

I use our own git repo, as "origin", for branches, etc. I have the pantheon repo as my "upstream" and (usually) push to it from our own master once changes are merged.

Don't forget that Pantheon has three environments (dev, test, live) that your changes propagate through. So pushing to their master is only pushing to their dev environment, which you would then have to move through to live. It's not like pushing to master which is in turn hosting your production site.

View solution in original post

8 REPLIES 8

Dear @José Cedeño ,

Did you get a chance to play with Pantheon Multi Dev feature ? It's supported only in Business & Elite Plans.

If it's currently not supported in your developer portal, Please talk to Apigee Sales / Point of contact if you are interested regarding same.

I have read the Pantheon documentation and know about the Multi Dev feature. We have Apigee SMB. I am trying to take advantage of what's currently offered. I have read the documentation from Apigee and it just refers to just Dev, Test and Live. I wanted to know how people are making these three environments work. Having to rebase and squash commits works, it's just not a best practice to be doing git force pushes to master.

I use our own git repo, as "origin", for branches, etc. I have the pantheon repo as my "upstream" and (usually) push to it from our own master once changes are merged.

Don't forget that Pantheon has three environments (dev, test, live) that your changes propagate through. So pushing to their master is only pushing to their dev environment, which you would then have to move through to live. It's not like pushing to master which is in turn hosting your production site.

I tried using this approach, but since I have to push to pantheon's git repo to test changes, I end up with small commits. In order to keep the history clean and remove failed code changes I squash commits and do force updates to master, which I'd rather not do.

Well...I guess the part I left out is running everything locally first. My local Drupal instance sits in the git directory. I do the majority of the work there.

Ok, that makes sense thank you. Was it fairly painless to run things locally since the Drupal site talks to the Apigee Gateway?

@José Cedeño , Yes, It should work locally. We do all the development locally and once everything is working fine we push it to pantheon.

Here's what I have in my notes to get it to work:

1. In .htaccess, find and uncomment the line: RewriteBase /

2. To connect your local instance with the same apigee data available at the deployed site:

a. Change profiles/apigee/modules/custom/devconnect/devconnect.admin.inc

from define('DEVCONNECT_SHOW_CONFIG_FIELDS', FALSE);

to define('DEVCONNECT_SHOW_CONFIG_FIELDS', TRUE);

b. Go to admin/config/devconnect and put in your apigee username/password