Skip to content

Instantly share code, notes, and snippets.

@ghanbak
Last active May 24, 2017 16:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ghanbak/7662727 to your computer and use it in GitHub Desktop.
Save ghanbak/7662727 to your computer and use it in GitHub Desktop.

Pantheon Development

Git Mode

Follow this flow of using Pantheon in git mode:

git status
git add . //or git add <file>
git commit
//write your commit
git push

SFTP Mode

Follow this flow of using Pantheon in sftp mode:

git reset --hard
git pull

This will reset to the last stable commit and then pull the most up to date files; effectively, making the dev environment on Pantheon the master

Sublime SFTP Settings for Pantheon

sftp.json file

{
// The tab key will cycle through the settings when first created
// Visit http://wbond.net/sublime_packages/sftp/settings for help
// sftp, ftp or ftps
"type": "sftp",
 
"save_before_upload": true,
"upload_on_save": true,
"sync_down_on_open": true,
"sync_skip_deletes": false,
"sync_same_age": true,
"confirm_downloads": true,
"confirm_sync": true,
"confirm_overwrite_newer": false,
"host": "hostname",
"user": "pantheon-username",
"password": "pantheon-password",
"port": "2222", //Typically the pantheon port number
"remote_path": "/path/to/code/",
"ignore_regexes": [
"\\.sublime-(project|workspace)", "sftp-config(-alt\\d?)?\\.json",
"sftp-settings\\.json", "/venv/", "\\.svn", "\\.hg", "\\.git",
"\\.bzr", "_darcs", "CVS", "\\.DS_Store", "Thumbs\\.db", "desktop\\.ini"
],
//"file_permissions": "664",
//"dir_permissions": "775",
//"extra_list_connections": 0,
 
"connect_timeout": 30,
//"keepalive": 120,
//"ftp_passive_mode": true,
//"ssh_key_file": "~/.ssh/id_rsa",
//"sftp_flags": ["-F", "/path/to/ssh_config"],
//"preserve_modification_times": false,
//"remote_time_offset_in_hours": 0,
//"remote_encoding": "utf-8",
//"remote_locale": "C",
}

To find the path to your code, download pantheon.aliases.drushrc.php and save to ~/.drush then run drush cc drush. After clearing the drush cache run this:

drush @pantheon.PROJECTNAME.ENV status --strict=0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment