SlideShare ist ein Scribd-Unternehmen logo
1 von 33
git
and WordPress
Who am I?
● Owner & Director @ QC Creative
● PHP/MySQL Developer since 2004
● Front-end Specialist since 2007
● Amateur Photographer
● Lifelong Learner...
Why should you listen to me?
● Built custom PHP applications for clients
like Magic Hat & UVM
● Since 2010, have used WordPress for >90%
of projects
● Host & manage over 60 WordPress sites
How do we deploy now?
● “Cowboy Coding”
● FTP/SFTP/SCP with a local development
environment or staging server
● FTP/SFTP/SCP with local development AND
a staging server
Have you ever wondered...
● Did I edit that CSS file on my local copy or
on the FTP server?
● If I upload this, will it break anything?
● What if my client/boss wants me to undo all
of these changes?
We should be able to answer...
● Who changed this file?
● What did this file look like before?
● Where has this file been uploaded?
● When was this file changed?
● Why was this file changed?
Version Control to the Rescue!
Version control:
● tracks changes to files, as well as variations
or “branches” of an entire project
● allows us to move through a history of
snapshots of our project
● allows us to share our work with others
seamlessly
Some words...
Repository
Branch
Commit
Clone
Remote
Check out
Push
Pull
Fetch
git vs. SVN
In theory:
● SVN is centralized.
● git is decentralized.
In practice:
● git is often used with a centralized
repository.
SVN is centralized
● Complete project history is stored on a
central server.
● Individual developers “check out” the latest
versions of files in order to work on them.
● Branches are complete copies of the
project, stored in a separate folder.
git is distributed
● Every git repository contains a complete
history of the entire project.
● Any git repository can act as a “remote” for
any other git repository.
● Branches are cheap — they are just
pointers.
In practice, git is centralized too...
● git doesn’t care, but for the humans, it is usually best
to declare a canonical central repository.
● Usually you’ll use a hosted service like github or
bitbucket for this, but it is also possible to host
yourself.
● Teams may still share work amongst themselves before
“pushing” to the central repository.
Using git with subteams and a central repository
WordPress core development
● WordPress core development still uses SVN
:(
● It is possible to use git for core
development, and convert your patches to
SVN :)
git basics
● Working directory
● Staging area
● HEAD
The git workflow
Using Branches Best
● With git, branches are your friends.
● Branch early, branch often.
● Learn how interactively:http://pcottle.github.io/learnGitBranching/
For sole developers
● Designate a branch as your “clean” branch — usually
`master`.
● Create a new branch for each new feature or story.
● As a feature is completed and tested, merge its branch
into your clean branch, then deploy.
● Optionally maintain designated branches for each
server, to track what has been deployed.
● ONLY merge changes into server branches after you
have deployed the changes.
For teams
Read about git-flow
or github-flow.
Remote repositories
● Remote repositories can be anywhere.
● Usually, access is via SSH with private keys
for passwordless interactions.
● Sometimes the live site is a git repository.
We don’t want to track everything
● .gitignore is a plaintext file that tells git
which files and folders to ignore
● Create one for every repository
● Essential for using git with WordPress
● What to ignore:
o wp-content/uploads
o local config files
o self-contained external libraries
Using git with WordPress
● What do I track in git?
o My custom theme?
o My entire wp-content folder?
o My entire public folder?
o My entire project folder?
● Where do I keep my repositories?
My philosophy
Track everything.
Keep it anywhere.
2011: Mark Jaquith’s WP Skeleton
● Mark Jaquith is one of the lead WP Core
developers.
● Mark really doesn’t want you to cowboy
code.
● He made WP-Skeleton, which is a starter git
repository for WordPress project.
WP Skeleton
● WordPress core files are kept in a
subdirectory, tracked as a git submodule.
● wp-config.php is modified to allow local
configuration overrides.
● Everything is awesome…
● Right?
Not quite...
● git submodules are a major PITA.
● Submodules are not designed for
dependency management.
● Local config options could be more robust
and allow for multiple environments.
We need Dependency Management
● Wouldn’t it be great if we could keep one
list of all of the external plugins, themes,
and libraries required by our site, and have
it always kept up to date?
● Composer can do that for you.
Composer
● Installs, tracks and manages PHP libraries.
● WordPress is a PHP library
● WordPress plugins are PHP libraries
● WordPress themes are PHP libraries
● Most WordPress-directory plugins are
available for Composer through
wpackagist.org
Roots.io & Bedrock
● Bedrock is an open source WordPress
“starter pack.”
● It has everything you need to start using
composer and git with your WordPress
projects.
● Available at:
https://github.com/roots/bedrock
Thanks!
Thank you to Gregg Bense for organizing this
event
Thank you to the Fletcher Free Library for
hosting this event
Questions?
Josh Lee
(802) 735.2274
josh@qccreative.com
Additional Resources
BitBucket (http://bitbucket.org)
Github (http://github.org)
Source Tree (http://www.sourcetreeapp.com/)
Tower (http://www.git-tower.com/)
git-scm book (http://git-scm.com)
https://help.github.com/articles/generating-ssh-keys (The best info on SSH keys and how to use them with git)
http://rkulla.blogspot.com/2011/08/some-points-on-git-vs-subversion.html
http://www.slideshare.net/terrywang/git-101-tutorial-presentation (700-slide presentation — very
clear)http://pcottle.github.io/learnGitBranching/ (Interactive tutorial)
http://danielkummer.github.io/git-flow-cheatsheet/
http://nvie.com/posts/a-successful-git-branching-model/
http://documentup.com/skwp/git-workflows-book
http://wpengine.com/git/

Weitere ähnliche Inhalte

Was ist angesagt?

WordPress Developer tools
WordPress Developer toolsWordPress Developer tools
WordPress Developer toolsSudar Muthu
 
Angular2.0@Shanghai0319
Angular2.0@Shanghai0319Angular2.0@Shanghai0319
Angular2.0@Shanghai0319Bibby Chung
 
Integrating grunt and bower with maven
Integrating grunt and bower with mavenIntegrating grunt and bower with maven
Integrating grunt and bower with mavenRahul Nanwani
 
The Future of-the CMS (Twin Cities DrupalCamp 2015)
The Future of-the CMS (Twin Cities DrupalCamp 2015)The Future of-the CMS (Twin Cities DrupalCamp 2015)
The Future of-the CMS (Twin Cities DrupalCamp 2015)Todd Ross Nienkerk
 
Introduction to Gutenberg- Imran Sayed
Introduction to Gutenberg- Imran SayedIntroduction to Gutenberg- Imran Sayed
Introduction to Gutenberg- Imran SayedImran Sayed
 
Wade.Go Introduction Speech - SFD HCMC 2014
Wade.Go Introduction Speech - SFD HCMC 2014Wade.Go Introduction Speech - SFD HCMC 2014
Wade.Go Introduction Speech - SFD HCMC 2014Nguyễn Thành Hải
 
The Ultimate WordPress Development Environment
The Ultimate WordPress Development EnvironmentThe Ultimate WordPress Development Environment
The Ultimate WordPress Development EnvironmentMatt Geri
 
Ryan Markel - WordCamp StL 2016 - Code Review
Ryan Markel - WordCamp StL 2016 - Code ReviewRyan Markel - WordCamp StL 2016 - Code Review
Ryan Markel - WordCamp StL 2016 - Code Reviewryanmarkel
 
WordPress security & sanitation for beginners
WordPress security & sanitation for beginnersWordPress security & sanitation for beginners
WordPress security & sanitation for beginnersD'nelle Dowis
 
Front-end development automation with Grunt
Front-end development automation with GruntFront-end development automation with Grunt
Front-end development automation with Gruntbenko
 
Building the Front End with AngularJS
Building the Front End with AngularJSBuilding the Front End with AngularJS
Building the Front End with AngularJSJohn Ennew
 
Word press beirut December 4 Meetup - Gutenberg VS WP-Bakery
Word press beirut December 4 Meetup - Gutenberg VS WP-Bakery Word press beirut December 4 Meetup - Gutenberg VS WP-Bakery
Word press beirut December 4 Meetup - Gutenberg VS WP-Bakery Fadi Nicolas Zahhar
 
10 things you should know about django
10 things you should know about django10 things you should know about django
10 things you should know about djangoAdieu
 
The swiss knife of a word press developer
The swiss knife of a word press developerThe swiss knife of a word press developer
The swiss knife of a word press developerIvelina Dimova
 
WordCamp US 2016 - Ryan Markel: Code Review
WordCamp US 2016 - Ryan Markel: Code ReviewWordCamp US 2016 - Ryan Markel: Code Review
WordCamp US 2016 - Ryan Markel: Code Reviewthemarkel
 
Google web toolkit ( Gwt )
 Google web toolkit ( Gwt ) Google web toolkit ( Gwt )
Google web toolkit ( Gwt )Pankaj Bhasker
 

Was ist angesagt? (20)

WordPress Developer tools
WordPress Developer toolsWordPress Developer tools
WordPress Developer tools
 
Blogging for hackers (english)
Blogging for hackers (english)Blogging for hackers (english)
Blogging for hackers (english)
 
Blazor v1.1
Blazor v1.1Blazor v1.1
Blazor v1.1
 
Angular2.0@Shanghai0319
Angular2.0@Shanghai0319Angular2.0@Shanghai0319
Angular2.0@Shanghai0319
 
Integrating grunt and bower with maven
Integrating grunt and bower with mavenIntegrating grunt and bower with maven
Integrating grunt and bower with maven
 
The Future of-the CMS (Twin Cities DrupalCamp 2015)
The Future of-the CMS (Twin Cities DrupalCamp 2015)The Future of-the CMS (Twin Cities DrupalCamp 2015)
The Future of-the CMS (Twin Cities DrupalCamp 2015)
 
DevDay 2018 - Blazor
DevDay 2018 - BlazorDevDay 2018 - Blazor
DevDay 2018 - Blazor
 
Introduction to Gutenberg- Imran Sayed
Introduction to Gutenberg- Imran SayedIntroduction to Gutenberg- Imran Sayed
Introduction to Gutenberg- Imran Sayed
 
Wade.Go Introduction Speech - SFD HCMC 2014
Wade.Go Introduction Speech - SFD HCMC 2014Wade.Go Introduction Speech - SFD HCMC 2014
Wade.Go Introduction Speech - SFD HCMC 2014
 
The Ultimate WordPress Development Environment
The Ultimate WordPress Development EnvironmentThe Ultimate WordPress Development Environment
The Ultimate WordPress Development Environment
 
WP-Boot
WP-BootWP-Boot
WP-Boot
 
Ryan Markel - WordCamp StL 2016 - Code Review
Ryan Markel - WordCamp StL 2016 - Code ReviewRyan Markel - WordCamp StL 2016 - Code Review
Ryan Markel - WordCamp StL 2016 - Code Review
 
WordPress security & sanitation for beginners
WordPress security & sanitation for beginnersWordPress security & sanitation for beginners
WordPress security & sanitation for beginners
 
Front-end development automation with Grunt
Front-end development automation with GruntFront-end development automation with Grunt
Front-end development automation with Grunt
 
Building the Front End with AngularJS
Building the Front End with AngularJSBuilding the Front End with AngularJS
Building the Front End with AngularJS
 
Word press beirut December 4 Meetup - Gutenberg VS WP-Bakery
Word press beirut December 4 Meetup - Gutenberg VS WP-Bakery Word press beirut December 4 Meetup - Gutenberg VS WP-Bakery
Word press beirut December 4 Meetup - Gutenberg VS WP-Bakery
 
10 things you should know about django
10 things you should know about django10 things you should know about django
10 things you should know about django
 
The swiss knife of a word press developer
The swiss knife of a word press developerThe swiss knife of a word press developer
The swiss knife of a word press developer
 
WordCamp US 2016 - Ryan Markel: Code Review
WordCamp US 2016 - Ryan Markel: Code ReviewWordCamp US 2016 - Ryan Markel: Code Review
WordCamp US 2016 - Ryan Markel: Code Review
 
Google web toolkit ( Gwt )
 Google web toolkit ( Gwt ) Google web toolkit ( Gwt )
Google web toolkit ( Gwt )
 

Andere mochten auch

WordPress and Git
WordPress and GitWordPress and Git
WordPress and GitRob Miller
 
Developing with WordPress and Git
Developing with WordPress and GitDeveloping with WordPress and Git
Developing with WordPress and GitRob Miller
 
Wordpress version control
Wordpress version controlWordpress version control
Wordpress version controlDavid Doolin
 
WordPress Theme Development: Part 2
WordPress Theme Development: Part 2WordPress Theme Development: Part 2
WordPress Theme Development: Part 2Josh Lee
 
Introduction to using Grunt & Bower with WordPress theme development
Introduction to using Grunt & Bower with WordPress theme developmentIntroduction to using Grunt & Bower with WordPress theme development
Introduction to using Grunt & Bower with WordPress theme developmentJames Bundey
 
Migrating a Site Quickly with SSH and WP-CLI (It's not as scary as you think!)
Migrating a Site Quickly with SSH and WP-CLI (It's not as scary as you think!)Migrating a Site Quickly with SSH and WP-CLI (It's not as scary as you think!)
Migrating a Site Quickly with SSH and WP-CLI (It's not as scary as you think!)Japheth Thomson
 
Introducing Git to your FTP workflow
Introducing Git to your FTP workflow Introducing Git to your FTP workflow
Introducing Git to your FTP workflow Roman Rus
 
Writing Well-Behaved Unix Utilities
Writing Well-Behaved Unix UtilitiesWriting Well-Behaved Unix Utilities
Writing Well-Behaved Unix UtilitiesRob Miller
 
Using Git with WordPress - Presented by Nigel Rodgers.
Using Git with WordPress - Presented by Nigel Rodgers.Using Git with WordPress - Presented by Nigel Rodgers.
Using Git with WordPress - Presented by Nigel Rodgers.WordCamp Harare
 
WordPress & Version Control: A Workflow
WordPress & Version Control: A WorkflowWordPress & Version Control: A Workflow
WordPress & Version Control: A WorkflowAaron Holbrook
 
WordPress Theme Structure
WordPress Theme StructureWordPress Theme Structure
WordPress Theme Structurekeithdevon
 

Andere mochten auch (12)

WordPress and Git
WordPress and GitWordPress and Git
WordPress and Git
 
Developing with WordPress and Git
Developing with WordPress and GitDeveloping with WordPress and Git
Developing with WordPress and Git
 
Wordpress version control
Wordpress version controlWordpress version control
Wordpress version control
 
WordPress Development - Taxonomies
WordPress Development -  TaxonomiesWordPress Development -  Taxonomies
WordPress Development - Taxonomies
 
WordPress Theme Development: Part 2
WordPress Theme Development: Part 2WordPress Theme Development: Part 2
WordPress Theme Development: Part 2
 
Introduction to using Grunt & Bower with WordPress theme development
Introduction to using Grunt & Bower with WordPress theme developmentIntroduction to using Grunt & Bower with WordPress theme development
Introduction to using Grunt & Bower with WordPress theme development
 
Migrating a Site Quickly with SSH and WP-CLI (It's not as scary as you think!)
Migrating a Site Quickly with SSH and WP-CLI (It's not as scary as you think!)Migrating a Site Quickly with SSH and WP-CLI (It's not as scary as you think!)
Migrating a Site Quickly with SSH and WP-CLI (It's not as scary as you think!)
 
Introducing Git to your FTP workflow
Introducing Git to your FTP workflow Introducing Git to your FTP workflow
Introducing Git to your FTP workflow
 
Writing Well-Behaved Unix Utilities
Writing Well-Behaved Unix UtilitiesWriting Well-Behaved Unix Utilities
Writing Well-Behaved Unix Utilities
 
Using Git with WordPress - Presented by Nigel Rodgers.
Using Git with WordPress - Presented by Nigel Rodgers.Using Git with WordPress - Presented by Nigel Rodgers.
Using Git with WordPress - Presented by Nigel Rodgers.
 
WordPress & Version Control: A Workflow
WordPress & Version Control: A WorkflowWordPress & Version Control: A Workflow
WordPress & Version Control: A Workflow
 
WordPress Theme Structure
WordPress Theme StructureWordPress Theme Structure
WordPress Theme Structure
 

Ähnlich wie Introduction to git & WordPress

Open Innovation Lab (OIL) - 20150227 - GIT Intro Workshop
Open Innovation Lab (OIL) - 20150227 - GIT Intro WorkshopOpen Innovation Lab (OIL) - 20150227 - GIT Intro Workshop
Open Innovation Lab (OIL) - 20150227 - GIT Intro WorkshopWong Hoi Sing Edison
 
How to plan and define your CI-CD pipeline
How to plan and define your CI-CD pipelineHow to plan and define your CI-CD pipeline
How to plan and define your CI-CD pipelineElasTest Project
 
Barcamp Macau 2014 - Introduction to GIT
Barcamp Macau 2014 - Introduction to GITBarcamp Macau 2014 - Introduction to GIT
Barcamp Macau 2014 - Introduction to GITWong Hoi Sing Edison
 
My "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsMy "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsGR8Conf
 
Collaborative development with git
Collaborative development with gitCollaborative development with git
Collaborative development with gitJoseluis Laso
 
Puppet managed loadays
Puppet managed loadaysPuppet managed loadays
Puppet managed loadaysloadays
 
Efficient development workflows with composer
Efficient development workflows with composerEfficient development workflows with composer
Efficient development workflows with composernuppla
 
Puppet managed loadays
Puppet managed loadaysPuppet managed loadays
Puppet managed loadaysYankee Nemoy
 
Plone Intranet under the hood
Plone Intranet under the hoodPlone Intranet under the hood
Plone Intranet under the hoodGuido Stevens
 
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Michael Lihs
 
Efficient development workflows with composer
Efficient development workflows with composerEfficient development workflows with composer
Efficient development workflows with composernuppla
 
Que nos espera a los ALM Dudes para el 2013?
Que nos espera a los ALM Dudes para el 2013?Que nos espera a los ALM Dudes para el 2013?
Que nos espera a los ALM Dudes para el 2013?Bruno Capuano
 
Git 101: Force-sensitive to Jedi padawan
Git 101: Force-sensitive to Jedi padawanGit 101: Force-sensitive to Jedi padawan
Git 101: Force-sensitive to Jedi padawanJames Ford
 
[HKDUG] #20180512 - Fix Hacked Drupal with GIT
[HKDUG] #20180512 - Fix Hacked Drupal with GIT[HKDUG] #20180512 - Fix Hacked Drupal with GIT
[HKDUG] #20180512 - Fix Hacked Drupal with GITWong Hoi Sing Edison
 
Go with the Flow - A Guide to a WordPress Workflow
Go with the Flow - A Guide to a WordPress WorkflowGo with the Flow - A Guide to a WordPress Workflow
Go with the Flow - A Guide to a WordPress WorkflowAnn Cascarano
 

Ähnlich wie Introduction to git & WordPress (20)

Git sourcecontrolpreso
Git sourcecontrolpresoGit sourcecontrolpreso
Git sourcecontrolpreso
 
Open Innovation Lab (OIL) - 20150227 - GIT Intro Workshop
Open Innovation Lab (OIL) - 20150227 - GIT Intro WorkshopOpen Innovation Lab (OIL) - 20150227 - GIT Intro Workshop
Open Innovation Lab (OIL) - 20150227 - GIT Intro Workshop
 
How to plan and define your CI-CD pipeline
How to plan and define your CI-CD pipelineHow to plan and define your CI-CD pipeline
How to plan and define your CI-CD pipeline
 
Barcamp Macau 2014 - Introduction to GIT
Barcamp Macau 2014 - Introduction to GITBarcamp Macau 2014 - Introduction to GIT
Barcamp Macau 2014 - Introduction to GIT
 
My "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsMy "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails Projects
 
Collaborative development with git
Collaborative development with gitCollaborative development with git
Collaborative development with git
 
Puppet managed loadays
Puppet managed loadaysPuppet managed loadays
Puppet managed loadays
 
Efficient development workflows with composer
Efficient development workflows with composerEfficient development workflows with composer
Efficient development workflows with composer
 
Puppet managed loadays
Puppet managed loadaysPuppet managed loadays
Puppet managed loadays
 
Plone Intranet under the hood
Plone Intranet under the hoodPlone Intranet under the hood
Plone Intranet under the hood
 
01 - Git vs SVN
01 - Git vs SVN01 - Git vs SVN
01 - Git vs SVN
 
Git pusshuten
Git pusshutenGit pusshuten
Git pusshuten
 
Git best practices workshop
Git best practices workshopGit best practices workshop
Git best practices workshop
 
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
 
Efficient development workflows with composer
Efficient development workflows with composerEfficient development workflows with composer
Efficient development workflows with composer
 
Que nos espera a los ALM Dudes para el 2013?
Que nos espera a los ALM Dudes para el 2013?Que nos espera a los ALM Dudes para el 2013?
Que nos espera a los ALM Dudes para el 2013?
 
Git In One Evening
Git In One EveningGit In One Evening
Git In One Evening
 
Git 101: Force-sensitive to Jedi padawan
Git 101: Force-sensitive to Jedi padawanGit 101: Force-sensitive to Jedi padawan
Git 101: Force-sensitive to Jedi padawan
 
[HKDUG] #20180512 - Fix Hacked Drupal with GIT
[HKDUG] #20180512 - Fix Hacked Drupal with GIT[HKDUG] #20180512 - Fix Hacked Drupal with GIT
[HKDUG] #20180512 - Fix Hacked Drupal with GIT
 
Go with the Flow - A Guide to a WordPress Workflow
Go with the Flow - A Guide to a WordPress WorkflowGo with the Flow - A Guide to a WordPress Workflow
Go with the Flow - A Guide to a WordPress Workflow
 

Kürzlich hochgeladen

Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...SUHANI PANDEY
 
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort ServiceBusty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort ServiceDelhi Call girls
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...APNIC
 
Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtrahman018755
 
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.soniya singh
 
Al Barsha Night Partner +0567686026 Call Girls Dubai
Al Barsha Night Partner +0567686026 Call Girls  DubaiAl Barsha Night Partner +0567686026 Call Girls  Dubai
Al Barsha Night Partner +0567686026 Call Girls DubaiEscorts Call Girls
 
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl ServiceRussian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl Servicegwenoracqe6
 
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...SUHANI PANDEY
 
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.soniya singh
 
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...Neha Pandey
 
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night StandHot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Standkumarajju5765
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445ruhi
 
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024APNIC
 
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableSeo
 
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls DubaiDubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubaikojalkojal131
 
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Call Girls in Nagpur High Profile
 

Kürzlich hochgeladen (20)

Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
 
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
 
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort ServiceBusty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
 
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
 
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
 
Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirt
 
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
 
Al Barsha Night Partner +0567686026 Call Girls Dubai
Al Barsha Night Partner +0567686026 Call Girls  DubaiAl Barsha Night Partner +0567686026 Call Girls  Dubai
Al Barsha Night Partner +0567686026 Call Girls Dubai
 
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl ServiceRussian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
 
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
 
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
 
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
 
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night StandHot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
 
VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
 
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
 
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
 
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls DubaiDubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
 
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
 

Introduction to git & WordPress

  • 2. Who am I? ● Owner & Director @ QC Creative ● PHP/MySQL Developer since 2004 ● Front-end Specialist since 2007 ● Amateur Photographer ● Lifelong Learner...
  • 3. Why should you listen to me? ● Built custom PHP applications for clients like Magic Hat & UVM ● Since 2010, have used WordPress for >90% of projects ● Host & manage over 60 WordPress sites
  • 4. How do we deploy now? ● “Cowboy Coding” ● FTP/SFTP/SCP with a local development environment or staging server ● FTP/SFTP/SCP with local development AND a staging server
  • 5. Have you ever wondered... ● Did I edit that CSS file on my local copy or on the FTP server? ● If I upload this, will it break anything? ● What if my client/boss wants me to undo all of these changes?
  • 6. We should be able to answer... ● Who changed this file? ● What did this file look like before? ● Where has this file been uploaded? ● When was this file changed? ● Why was this file changed?
  • 7. Version Control to the Rescue! Version control: ● tracks changes to files, as well as variations or “branches” of an entire project ● allows us to move through a history of snapshots of our project ● allows us to share our work with others seamlessly
  • 9. git vs. SVN In theory: ● SVN is centralized. ● git is decentralized. In practice: ● git is often used with a centralized repository.
  • 10.
  • 11. SVN is centralized ● Complete project history is stored on a central server. ● Individual developers “check out” the latest versions of files in order to work on them. ● Branches are complete copies of the project, stored in a separate folder.
  • 12. git is distributed ● Every git repository contains a complete history of the entire project. ● Any git repository can act as a “remote” for any other git repository. ● Branches are cheap — they are just pointers.
  • 13. In practice, git is centralized too... ● git doesn’t care, but for the humans, it is usually best to declare a canonical central repository. ● Usually you’ll use a hosted service like github or bitbucket for this, but it is also possible to host yourself. ● Teams may still share work amongst themselves before “pushing” to the central repository.
  • 14. Using git with subteams and a central repository
  • 15. WordPress core development ● WordPress core development still uses SVN :( ● It is possible to use git for core development, and convert your patches to SVN :)
  • 16. git basics ● Working directory ● Staging area ● HEAD
  • 18. Using Branches Best ● With git, branches are your friends. ● Branch early, branch often. ● Learn how interactively:http://pcottle.github.io/learnGitBranching/
  • 19. For sole developers ● Designate a branch as your “clean” branch — usually `master`. ● Create a new branch for each new feature or story. ● As a feature is completed and tested, merge its branch into your clean branch, then deploy. ● Optionally maintain designated branches for each server, to track what has been deployed. ● ONLY merge changes into server branches after you have deployed the changes.
  • 20. For teams Read about git-flow or github-flow.
  • 21. Remote repositories ● Remote repositories can be anywhere. ● Usually, access is via SSH with private keys for passwordless interactions. ● Sometimes the live site is a git repository.
  • 22. We don’t want to track everything ● .gitignore is a plaintext file that tells git which files and folders to ignore ● Create one for every repository ● Essential for using git with WordPress ● What to ignore: o wp-content/uploads o local config files o self-contained external libraries
  • 23. Using git with WordPress ● What do I track in git? o My custom theme? o My entire wp-content folder? o My entire public folder? o My entire project folder? ● Where do I keep my repositories?
  • 25. 2011: Mark Jaquith’s WP Skeleton ● Mark Jaquith is one of the lead WP Core developers. ● Mark really doesn’t want you to cowboy code. ● He made WP-Skeleton, which is a starter git repository for WordPress project.
  • 26. WP Skeleton ● WordPress core files are kept in a subdirectory, tracked as a git submodule. ● wp-config.php is modified to allow local configuration overrides. ● Everything is awesome… ● Right?
  • 27. Not quite... ● git submodules are a major PITA. ● Submodules are not designed for dependency management. ● Local config options could be more robust and allow for multiple environments.
  • 28. We need Dependency Management ● Wouldn’t it be great if we could keep one list of all of the external plugins, themes, and libraries required by our site, and have it always kept up to date? ● Composer can do that for you.
  • 29. Composer ● Installs, tracks and manages PHP libraries. ● WordPress is a PHP library ● WordPress plugins are PHP libraries ● WordPress themes are PHP libraries ● Most WordPress-directory plugins are available for Composer through wpackagist.org
  • 30. Roots.io & Bedrock ● Bedrock is an open source WordPress “starter pack.” ● It has everything you need to start using composer and git with your WordPress projects. ● Available at: https://github.com/roots/bedrock
  • 31. Thanks! Thank you to Gregg Bense for organizing this event Thank you to the Fletcher Free Library for hosting this event
  • 33. Additional Resources BitBucket (http://bitbucket.org) Github (http://github.org) Source Tree (http://www.sourcetreeapp.com/) Tower (http://www.git-tower.com/) git-scm book (http://git-scm.com) https://help.github.com/articles/generating-ssh-keys (The best info on SSH keys and how to use them with git) http://rkulla.blogspot.com/2011/08/some-points-on-git-vs-subversion.html http://www.slideshare.net/terrywang/git-101-tutorial-presentation (700-slide presentation — very clear)http://pcottle.github.io/learnGitBranching/ (Interactive tutorial) http://danielkummer.github.io/git-flow-cheatsheet/ http://nvie.com/posts/a-successful-git-branching-model/ http://documentup.com/skwp/git-workflows-book http://wpengine.com/git/

Hinweis der Redaktion

  1. Tutorial Create a repository. Change a file. Add changes. Commit changes. View log. Repeat w/ Source Tree