wordcamp asheville 2014: wordpress and git
DESCRIPTION
WordPress and Git by Evan Volgas. Presented at WordCamp Asheville 2014TRANSCRIPT
![Page 2: WordCamp Asheville 2014: WordPress and Git](https://reader033.vdocuments.mx/reader033/viewer/2022061300/54c720df4a7959e16f8b4593/html5/thumbnails/2.jpg)
AKA the Least Tweetable WordCamp Presentation
Ever(No, seriously)
![Page 3: WordCamp Asheville 2014: WordPress and Git](https://reader033.vdocuments.mx/reader033/viewer/2022061300/54c720df4a7959e16f8b4593/html5/thumbnails/3.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022061300/54c720df4a7959e16f8b4593/html5/thumbnails/4.jpg)
What is Git?
![Page 5: WordCamp Asheville 2014: WordPress and Git](https://reader033.vdocuments.mx/reader033/viewer/2022061300/54c720df4a7959e16f8b4593/html5/thumbnails/5.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022061300/54c720df4a7959e16f8b4593/html5/thumbnails/6.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022061300/54c720df4a7959e16f8b4593/html5/thumbnails/7.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022061300/54c720df4a7959e16f8b4593/html5/thumbnails/8.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022061300/54c720df4a7959e16f8b4593/html5/thumbnails/9.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022061300/54c720df4a7959e16f8b4593/html5/thumbnails/10.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022061300/54c720df4a7959e16f8b4593/html5/thumbnails/11.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022061300/54c720df4a7959e16f8b4593/html5/thumbnails/12.jpg)