overcoming command line allergies

47
Overcoming Command Line Allergies Elaine Nelson elainenelson.org

Upload: elaine-nelson

Post on 21-Jan-2017

311 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Overcoming Command Line Allergies

Overcoming Command Line Allergies

Elaine Nelson v elainenelson.org

Page 2: Overcoming Command Line Allergies

Caveats

Page 3: Overcoming Command Line Allergies

What I want you to learn

Page 4: Overcoming Command Line Allergies

Who am I?

Page 5: Overcoming Command Line Allergies

WHY IS IT SO HARD?

Page 6: Overcoming Command Line Allergies

Cooking vs. Baking

Page 7: Overcoming Command Line Allergies

WHY SHOULD I BOTHER?

Page 8: Overcoming Command Line Allergies

Drush = Speed

Page 9: Overcoming Command Line Allergies

Features + Git = Better Drupaling

Page 10: Overcoming Command Line Allergies

The land of the “real” programmers

Page 11: Overcoming Command Line Allergies

FIND YOUR COMFORT ZONE

Page 12: Overcoming Command Line Allergies

IT’S DANGEROUS TO GO ALONE! TAKE THIS…

Page 13: Overcoming Command Line Allergies

Navigation

dir or ls cd

Page 14: Overcoming Command Line Allergies

Make it a little nicer•  clear (Mac only) •  Different styles •  Bigger type

Page 15: Overcoming Command Line Allergies
Page 16: Overcoming Command Line Allergies

Vim, nano, or whatever

Page 17: Overcoming Command Line Allergies

The Googles•  That XKCD flowchart

https://xkcd.com/627/

Page 18: Overcoming Command Line Allergies

The first time you try stuff, it might be terrible.

Page 19: Overcoming Command Line Allergies

SAMPLE PROJECT

Page 20: Overcoming Command Line Allergies

THIS IS THE PART WHERE WE CARGO CULT

Page 21: Overcoming Command Line Allergies

Set up a web server!MAMP + command line https://www.mamp.info/ http://bramvandenbulcke.be/en/article/installing-drush-mamp

Acquia Dev Desktop https://www.acquia.com/products-services/dev-desktop

Page 22: Overcoming Command Line Allergies

SAVE YOUR HANDS WITH DRUSH

Page 23: Overcoming Command Line Allergies

(Re)Installing Drupal

drush site-install

Page 24: Overcoming Command Line Allergies

Is this thing on?

drush status

Page 25: Overcoming Command Line Allergies

Module installation: the old way

Page 26: Overcoming Command Line Allergies

Module installation

drush en module_name

Page 27: Overcoming Command Line Allergies

Always say YES

drush en module_name --y

Page 28: Overcoming Command Line Allergies

Advanced module tricks

drush dl project_name drush en module_name-7.x-x.x

Page 29: Overcoming Command Line Allergies

Updates

drush up

Page 30: Overcoming Command Line Allergies

drush cc all

Page 31: Overcoming Command Line Allergies

How to go further•  Beginner’s guide

https://www.digitalocean.com/community/tutorials/a-beginner-s-guide-to-drush-the-drupal-shell

•  Full list of commands http://drushcommands.com/

•  Drupalize Me https://drupalize.me/videos/what-drush?p=1156

Page 32: Overcoming Command Line Allergies

A FEATURE IS A WHAT NOW?

Page 33: Overcoming Command Line Allergies

Naming things is hard•  Features is a module. •  A feature is something made with

Features. •  A feature is also itself a module.

The simplest way to create a setup of content types, views, and other stuff.

Page 34: Overcoming Command Line Allergies

Install Features

drush en features --y

Page 35: Overcoming Command Line Allergies

Building your feature

Page 36: Overcoming Command Line Allergies

Putting your Feature to work

drush en feature_name --y

Page 37: Overcoming Command Line Allergies

How to go farther•  Drush commands to use with Features:

https://www.drupal.org/node/960926

•  Migrate works with Features •  Drupalize Me (no, they’re not paying me)

Page 38: Overcoming Command Line Allergies

GIT IS YOUR SAFETY NET

Page 39: Overcoming Command Line Allergies

like Dropbox, but for Features

Page 40: Overcoming Command Line Allergies

Again on the live

Page 41: Overcoming Command Line Allergies

Adding changes

Needs  drush  fu  screenshot?  

Page 42: Overcoming Command Line Allergies

Stage > Commit > Push

Page 43: Overcoming Command Line Allergies

Rolling back

Page 44: Overcoming Command Line Allergies

Fetch > Pull > Revert

Page 45: Overcoming Command Line Allergies

Tools for GitGUIs for Git•  Cross-platform, free: Github & Sourcetree •  My preference: Tower (Mac only, $69)

Remote origin options•  Github •  Bitbucket •  Gitlab

Page 46: Overcoming Command Line Allergies

Add complexity as you need it•  Rolling back, branching, merging •  Git for Teams

Emma Jane Hogbin Westby http://shop.oreilly.com/product/0636920034520.do

Page 47: Overcoming Command Line Allergies

ALLERGY RELIEF