12
WordPress and Git Evan Volgas @EvanVolgas || evan.is

WordCamp Asheville 2014: WordPress and Git

  • Upload
    evankkc

  • View
    110

  • Download
    1

Embed Size (px)

DESCRIPTION

WordPress and Git by Evan Volgas. Presented at WordCamp Asheville 2014

Citation preview

Page 1: WordCamp Asheville 2014: WordPress and Git

WordPress and GitEvan Volgas

@EvanVolgas || evan.is

Page 2: WordCamp Asheville 2014: WordPress and Git

AKA the Least Tweetable WordCamp Presentation

Ever(No, seriously)

Page 3: WordCamp Asheville 2014: WordPress and Git

Random Tweet Suggestions

• Making WordPress development less painful with git-whiksey and deadlines-ignore #wcavl

• Learning the top ten git commands to make men/women fall in love with you #wcavl

• Brain fart to WordPress website in 13 seconds with Git and Miracle.js #wcavl

Page 4: WordCamp Asheville 2014: WordPress and Git

What is Git?

Page 5: WordCamp Asheville 2014: WordPress and Git

Some assumptions that I’ll be making today

• Google Exists

• You know how to use it

• You don’t need to tell me how to do something you can Google

• You probably think slides full of code are boring

• Really what you need to know is how to use Git (and get your team to use Git) in a way that actually saves you time

Page 6: WordCamp Asheville 2014: WordPress and Git

So…. what the heck are we going to talk about

today?• The lazy Git workflow that you won’t find on Google (maybe with good reason…???)

• Some other workflows you probably should know abut

• Git tools

• Ignoring things

• Applications for Git that you maybe haven’t considered yet

Page 7: WordCamp Asheville 2014: WordPress and Git

Tools for using Git• For Git Hosting: BitBucket, Beanstalk, Github,

Gitorious, others

• Git GUIs: Tower, Github for Windows/Mac, git-cola, others

• Diff management: Meld, Kaleidoscope, DiffMerge, others

• Text Editors: Atom, plugins for Coda/Sublime/Etc

• Special mention: Dploy.io, Capistrano, others

Page 8: WordCamp Asheville 2014: WordPress and Git

Key Concepts• git remote and git hooks (or Github

Web hooks): This is how you push stuff from your Git repo to your production site

• branching

• merging

• pulling

• pushing

Page 9: WordCamp Asheville 2014: WordPress and Git

Hi. Ignore me.

• gitignore: Tells Git to ignore certain things

• Default gitignore for WordPress: https://github.com/github/gitignore/blob/master/WordPress.gitignore

• You might want to add .DS_STORE on Mac

• (If you use Windows, you might want to stop using Windows)

• (If you use Linux, rock on)

Page 10: WordCamp Asheville 2014: WordPress and Git

A lazy workflow(that you might actually

use)# Ignore everything in the root except the "wp-content" directory.

/*

#Except the stuff I want to keep

!.gitignore

!/wp-content/

!/wp-content/themes/

!/wp-content/themes/*

/wp-content/themes/evanis/screenshot.png

/wp-content/themes/evanis/README.txt

/wp-content/themes/evanis/images

/wp-content/themes/evanis/languages

/wp-content/themes/evanis/xml

.DS_Store

Page 11: WordCamp Asheville 2014: WordPress and Git

Workflows, applications, and discussion

• Centralized: Everyone can push to master (just keep your local current)

• Feature-based: Everyone branches off of master and issues pull requests for their branches (again, keep your local current. There are also very specific methods of doing this that focus on development branches, release candidates, etc)

• Fork-based: Everyone forks the main and issues pull requests to the official repo

Page 12: WordCamp Asheville 2014: WordPress and Git