victorkane / lit-drupal-lean

Distro project for DrupalPicchu2014 Drupal Lean Process Workshop
GNU General Public License v2.0
10 stars 4 forks source link

Multidev on Pantheon workflow option #32

Open victorkane opened 10 years ago

victorkane commented 10 years ago

Intro to Pantheon Multidev

If you don't yet have Git installed on your computer, you can download it here for Windows and Mac OS X. If you're running Linux, you should install Git from your distribution's package manager.
Next you'll need to upload your SSH public key. If you don't know what an SSH public key is, please follow these SSH key generation instructions. You only need to do this once, no matter how many sites you have on Pantheon.
Get a cuppa coffee (give the system a few minutes to reconfigure with your ssh key)
Once you've completed the first two steps, clone your Git repository using the Git address for your site. You can do this on the command line by running these commands:  

git clone ssh://codeserver.dev.xxxxxxxx-xxxx-xxxn-xxxx-xxxxxxxxxxxx@codeserver.dev.xxxxxxxx-xxxx-xxxn-xxxx-xxxxxxxxxxxx.drush.in:2222/~/repository.git project-name
cd project-name
git checkout multidev-environment-name

If you'd like to use a GUI, there are also many free and commercial Git GUIs.
Sample workflow for pushing local code changes to Pantheon

git add .
git commit -m "Description of the change."
git push origin multidev-environment-name
The changes will show up on your dashboard within 5-10 seconds.

References on Multidev Git workflow

\ Regular strength **

\ Best **

# Update your local repo:
git fetch pantheon

# Switch to master (or devel, if merging a feature)
git checkout master

# Catch up with pantheon/master in any one of these ways:
git merge pantheon/master # Preferred in most cases
git rebase pantheon/master # Only if it would be wise to do so!
git reset --hard pantheon/master # Destroy local differences

# Merge your new branch
git merge --no-ff devel -m "Merge devel -> master: deploy ... ... ..."

# If you plan on tagging master, like I generally do:
git tag -a vX.Y.Z -m "Release X.Y.Z: ... ... ..."

# Push to Pantheon
git push pantheon master