SlideShare a Scribd company logo
FTP Commando to Git Hero

WordCamp Denver
November 16, 2013
Organize Fort Collins WordPress meetup
3 plugins on the WordPress repository
Build themes and plugins
FTP Commando to Git Hero - WordCamp Denver 2013
FTP Commando to Git Hero - WordCamp Denver 2013
1. What is version control,
and why use it?
and why use it?
2. How to use version control
with WordPress
with WordPress
3. Adding deployment to
your workflow
your workflow
What is version control?
me, pre-version control
Dated Folders
Problem #1
How do you access deleted code?
Problem #2
How do you effectively collaborate?
Problem #3
How do you know what change is in what folder?
Really long, descriptive folder names
Version Control
Provides a history of changes made
to files in a project
Version Control
Provides a history of changes made
to files in a project
Repository
Repository
Git
A popular vcs created in
2005 by Linus Torvalds, the
creator of the Linux kernel
Distributed
Everyone has their own copy of the project
Don’t need a network connection
No central repository
Distributed Version Control System
Server
repo

Computer A
repo

Computer B
repo
That’s all great, but how do I use it?
Fort Collins Lambkins
FTP Commando to Git Hero - WordCamp Denver 2013
Interacting with Git
Terminal
Remember keyboarding class?
FTP Commando to Git Hero - WordCamp Denver 2013
FTP Commando to Git Hero - WordCamp Denver 2013
git-scm.com/downloads
git init
git add <filename>
Staging

File 1
File 2
File 3

Repository
git commit -m “Initial commit”
Good Commit
Messages
1. Add navigation to header
2. Remove slider from homepage
Bad Commit
Messages
1. Fixed that thing that was broken.
2. Edited some code. Now I need a beer.
You are now using
version control!
QuickTime™ and a
GIF decompressor
are needed to see this picture.
git log
FTP Commando to Git Hero - WordCamp Denver 2013
git status
git commit -a -m “Commit Message”
git log
FTP Commando to Git Hero - WordCamp Denver 2013
git status
git add .
git commit -m “Add stylesheet”
How often should I
commit?
Is there a good commit message I could write?
Using Version Control
with WordPress
with WordPress

+
1. Install a fresh copy of WordPress
2. Initialize a new git repository
3. Create a .gitignore file
4. Add the current files to staging
5. Commit those files to the repository as the first commit
1. Install a fresh copy of WordPress
2. Initialize a new git repository
git init
3. Create a .gitignore file
4. Add current files to staging
git add .
5. Commit staged files to the repository
git commit -m “Initial commit”
+

!
1. Make changes to files.
2. Add those changed files to staging.
3. Commit staged files to the repository.
4. Repeat.
Real World Examples
Scenario #1

The Client Changes
Their Mind
The Client Changes
Their Mind
Check the project’s commit history
git log
Go back in time
git checkout <commit identifier>
FTP Commando to Git Hero - WordCamp Denver 2013
Scenario #2

Collaborate with
Another Developer
Collaborate with
Another Developer
Remote Hosting Options
Setup Connection to Remote Repository
git remote add origin <path_for_remote>
Server
repo

Computer A
repo
Send Repository to Remote Server
git push origin master
Server
repo

Computer A
repo
Developer Copies Repository Locally
git clone <url>
Server
repo

Computer A
repo

Computer B
repo
Developer Connects to Repository
git remote add origin <path_for_remote>
Server
repo

Computer A
repo

Computer B
repo
Developer Pushes Up Their Changes
git push origin <branch>
Server
repo

Computer A
repo

Computer B
repo
View Commit History
Branches
master

branch

branch
Why?
Stay more organized
Easily maintain your “in-progress” work separate from
your completed, tested, and stable code
Collaborate with others more effectively
master
Build features in branches

branch

merge
feature

bug
fix
Tips
Only commit finished work to the master branch
Create branches for features and large bug fixes
Delete feature branches once merged
Create New Branch

git branch <branch_name>
git checkout <branch_name>

master

branch
master
Build Cool Feature

branch
Merge Completed Feature

git checkout master
git merge <branch_name>
Merge Completed Feature

master

branch
Keep Your Repository Clean
git branch -d <branch_name>

master
Deployment
Push code. Deploy in one click.
Setup Repository
Set Permissions
Create Remote Repository
Create Your Remote
git remote add beanstalk <url>
Send Files to Your Remote
git push beanstalk master
Create Deployment Environment
Add Server to Environment
Test Connection Settings
Deploy!
Resources
Beanstalk Guides - http://guides.beanstalkapp.com
Git Book - http://git-scm.com/book
Git Immersion - http://gitimmersion.com/
Git Basics - http://teamtreehouse.com/library/git-basics
Questions?
@greenhornet79
endocreative.com

More Related Content

PDF
PDF
A Quick Start - Version Control with Git
PPTX
Quick and easy way to get started with Git & GitHub
PPTX
Git learn from scratch
ODP
Git 101, or, how to sanely manage your Koha customizations
PPTX
Git training (basic)
A Quick Start - Version Control with Git
Quick and easy way to get started with Git & GitHub
Git learn from scratch
Git 101, or, how to sanely manage your Koha customizations
Git training (basic)

What's hot (20)

PPTX
Version control system and Git
PPTX
Git basics to advance with diagrams
PPTX
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
PDF
git and github
PPT
Git101
PDF
Kernel Recipes 2016 - Patches carved into stone tablets...
PPTX
Github
PPT
Understanding and Using Git at Eclipse
PPTX
Introduction to git and github
PDF
Inside GitHub
 
PPTX
A prentation on github
PPTX
Git 101 for Beginners
PPT
Effective Git with Eclipse
PPTX
Git extension-training
PPTX
GitHub Presentation
PDF
Mini git tutorial
PDF
Introduction to Mercurial
PDF
An Introduction to Git
PDF
A Practical Introduction to git
Version control system and Git
Git basics to advance with diagrams
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
git and github
Git101
Kernel Recipes 2016 - Patches carved into stone tablets...
Github
Understanding and Using Git at Eclipse
Introduction to git and github
Inside GitHub
 
A prentation on github
Git 101 for Beginners
Effective Git with Eclipse
Git extension-training
GitHub Presentation
Mini git tutorial
Introduction to Mercurial
An Introduction to Git
A Practical Introduction to git
Ad

Viewers also liked (7)

PPTX
Nový portál s e knihami pro ženy fragment
KEY
10 Ways to Secure WordPress
PDF
The Final 20 Percent
PDF
Build a Membership Site with WordPress
PDF
Choosing the Right WordPress Theme
PPTX
Connecting Beyond
PPTX
Beautiful Destinations
Nový portál s e knihami pro ženy fragment
10 Ways to Secure WordPress
The Final 20 Percent
Build a Membership Site with WordPress
Choosing the Right WordPress Theme
Connecting Beyond
Beautiful Destinations
Ad

Similar to FTP Commando to Git Hero - WordCamp Denver 2013 (20)

PPTX
git.ppt.pptx power point presentation got Google internet
PPTX
Using Git with WordPress - Presented by Nigel Rodgers.
PDF
Git-r-Done
KEY
Let's Git this Party Started: An Introduction to Git and GitHub
PPTX
GIT.pptx
PPT
Fundamentals and basics of Git and commands
PPTX
Git Basics for Software Version Management
PPTX
Version Control with Git
PDF
Version Control with Git
PDF
Intro to git (UT biocomputing 2015)
PPTX
github ppt git ppt on git hub to know ab
PPTX
Git walkthrough
PDF
Git Version Control for the Complete N00b by Adam LaBarge
PPTX
Version controll.pptx
PDF
PPT
Version Control ThinkVitamin
PPTX
Introducing to git
PDF
Git for developers
git.ppt.pptx power point presentation got Google internet
Using Git with WordPress - Presented by Nigel Rodgers.
Git-r-Done
Let's Git this Party Started: An Introduction to Git and GitHub
GIT.pptx
Fundamentals and basics of Git and commands
Git Basics for Software Version Management
Version Control with Git
Version Control with Git
Intro to git (UT biocomputing 2015)
github ppt git ppt on git hub to know ab
Git walkthrough
Git Version Control for the Complete N00b by Adam LaBarge
Version controll.pptx
Version Control ThinkVitamin
Introducing to git
Git for developers

More from Jeremy Green (6)

PDF
Accelerated Mobile Pages - WordCamp Kansas City
PDF
Accelerated Mobile Pages
PDF
The Final 20%: Improving Craftsmanship in Web Development - WordCamp DFW 2015
PDF
You've Been Hacked, Now What? Getting WordPress Up and Running Again
PDF
Using Sass in Your WordPress Projects
KEY
WordCamp Denver 2012 - Custom Meta Boxes
Accelerated Mobile Pages - WordCamp Kansas City
Accelerated Mobile Pages
The Final 20%: Improving Craftsmanship in Web Development - WordCamp DFW 2015
You've Been Hacked, Now What? Getting WordPress Up and Running Again
Using Sass in Your WordPress Projects
WordCamp Denver 2012 - Custom Meta Boxes

Recently uploaded (20)

PPTX
Spectroscopy.pptx food analysis technology
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Encapsulation theory and applications.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
KodekX | Application Modernization Development
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Electronic commerce courselecture one. Pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Spectroscopy.pptx food analysis technology
The AUB Centre for AI in Media Proposal.docx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Programs and apps: productivity, graphics, security and other tools
Building Integrated photovoltaic BIPV_UPV.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
The Rise and Fall of 3GPP – Time for a Sabbatical?
Encapsulation theory and applications.pdf
Understanding_Digital_Forensics_Presentation.pptx
sap open course for s4hana steps from ECC to s4
Unlocking AI with Model Context Protocol (MCP)
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
KodekX | Application Modernization Development
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Reach Out and Touch Someone: Haptics and Empathic Computing
NewMind AI Weekly Chronicles - August'25 Week I
Electronic commerce courselecture one. Pdf
MIND Revenue Release Quarter 2 2025 Press Release
Agricultural_Statistics_at_a_Glance_2022_0.pdf

FTP Commando to Git Hero - WordCamp Denver 2013