SlideShare a Scribd company logo
Version Control Chris Nagele Alex Hillman
Today's Agenda A bit about us A bit about version control A practical intro to Git
We're from Wildbit Chris Nagele Founder  Transitioned business from consulting to product International Team - 7 countries represented Writer - ThinkVitamin, etc Spends days in the server closet  Alex Hillman Business Development Web development background Cofounded Indy Hall - Coworking in Philadelphia Public Speaker - SXSW, etc Spends days communicating with our customers
Beanstalkapp.com Go sign up for a free trial now!
Why Version Control?  
Why Version Control? cp index.html index-v12-old2.html
Why Version Control? cp index.html index-v12-old2.html There has to be a better way
The Old Way Unmaintainable filesystems and filenames Accidental overwriting of revisions Updates on live server Communicate with team via e-mail Multiple server management nightmare   
The New Way Filenames stay the same! Make changes with confidence - even revert! Source control as "source" for updates Code as communication with the whole team Deploy different versions to different servers easily  
Vocabulary Lesson Repository Track Changes Add or Update Files Commit Changes Revision Revert Branch Merge Diff 
Version Control Options  
Centralized  
Centralized Client & Server Relationship
Centralized Subversion  -  Benefits Easy to understand More control over users and access More GUI & IDE clients Simple to get started Free & Open Source! Disadvantages Dependent on a server Hard to manage a server (and backups!) Slower Some advanced tasks are very difficult
Decentralized (also known as Distributed) 
Decentralized A Network of Complete "Repositories"
Decentralized Git  & Mercurial  Benefits Powerful and detailed change tracking (you commit more often) No server necessary - everything is local It's fast to branch and merge  Free & Open Source! Disadvantages More to learn in order to  get started Not as many GUI or IDE clients It doesn't protect you from yourself
Any questions so far?  
Get Git!  
Get Git! http://bit.ly/downloadgit - for OSX
Get Git! http://bit.ly/downloadgit - for OSX Other platform? Sorry! http://git-scm.com
Get Sample Files http://bit.ly/samplefiles
Terminal  
Global Config  
Global Config git config --global user.name "Alex Hillman" git config --global user.email "alex@wildbit.com"  
Global Config git config --global user.name "Alex Hillman" git config --global user.email "alex@wildbit.com"   Verify: git config --list
Global Config - Bonus! git config --global color.status auto git config --global color.branch auto     
Global Config - Textmate Bonus! git config --global core.editor "mate -w"     Or replace "mate -w" with your favorite text editor
Command Line Basics     pwd  - present working directory     cd  - change directory     cd ..  - change directory up one folder level     ls  - list everything in present working directory     mkdir  - make directory     cp   - copy     mv   - move
My First Repository You never forget your first
Ignoring Files It's nothing personal
Git Status What the hell is going on?
The Stage And how to get your files on it
PSA: Beware of  Empty Folders!  
Committing No diamond necessary
Committing Changes A little about "insertions" and "deletions" Git is about "content" An insertion adds a new line of content A deletion removes a line of content A change is actually a deletion + an insertion  
Committing Changes A little about "insertions" and "deletions" Git is about "content" An insertion adds a new line of content A deletion removes a line of content A change is actually a deletion + an insertion Every change is very small, so commit often More commits = more communication
Inline Commits For quickies
Verbose Commits More to say? That's ok!
Stash Git's "Clipboard"
Commits as Communication Tasks, tickets, links, & more
Log What happened and when?
Remotes Don't change that channel
Sign up for Beanstalk! It’s ok…we’ll wait….
Keys
Keys ssh-keygen -t rsa
Keys ssh-keygen -t rsa cat ~/.ssh/id_rsa.pub | pbcopy
Keys
Creating a Remote The Easy Way – with Beanstalk
git remote add
git push
git push beanstalk master
Remotes Connecting some dots between the command line and Beanstalk
Remotes I Think I’m A Clone Now
Catastophe Delete your work
git clone
git remote
git remote rename
git pull
git pull beanstalk master
Branches
git branch
git checkout
Branches + Remotes
git push beanstalk ________ where ________ is the name of your branch
git push beanstalk colorchange
git pull beanstalk colorchange
Integrating Changes Without A Time Traveling DeLorean.
Rebase
Rebase Check out progit.org
Merge
Make sure you’re on the branch you want to merge TO
git merge __________  Where __________ is the name of your branch you wish to merge in.
Keep that Repo Tidy
git branch –d __________ Where __________ is the name of your branch you wish to delete.
Conflict Resolution
You didn’t commit yet!
You didn’t commit yet! error: Your local changes to the following files would be overwritten by merge: index.php Please, commit your changes or stash them before you can merge. Aborting
You Did Commit! But…
You Did Commit! But… * branch  master  -> FETCH_HEAD Auto-merging index.php CONFLICT (content): Merge conflict in index.php Automatic merge failed; fix conflicts and then commit the result.
Conflict Delimiters
Commit, then push!
Where to learn more
Thank You! Chris Nagele – Alex Hillman http://www.beanstalkapp.com @beanstalkapp

More Related Content

Similar to Version Control ThinkVitamin (20)

Git
GitGit
Git
Shinu Suresh
 
Git
GitGit
Git
Mayank Patel
 
Embracing Distributed Version Control
Embracing Distributed Version ControlEmbracing Distributed Version Control
Embracing Distributed Version Control
Nowell Strite
 
.Git for WordPress Developers
.Git for WordPress Developers.Git for WordPress Developers
.Git for WordPress Developers
mpvanwinkle
 
Becoming a Git Master - Nicola Paolucci
Becoming a Git Master - Nicola PaolucciBecoming a Git Master - Nicola Paolucci
Becoming a Git Master - Nicola Paolucci
Atlassian
 
Git workflows á la-carte, Presenation at jdays2013 www.jdays.se by Nicola Pao...
Git workflows á la-carte, Presenation at jdays2013 www.jdays.se by Nicola Pao...Git workflows á la-carte, Presenation at jdays2013 www.jdays.se by Nicola Pao...
Git workflows á la-carte, Presenation at jdays2013 www.jdays.se by Nicola Pao...
hamidsamadi
 
3 Git
3 Git3 Git
3 Git
Fabio Fumarola
 
Working with Git
Working with GitWorking with Git
Working with Git
Tony Hillerson
 
Becoming a Git Master
Becoming a Git MasterBecoming a Git Master
Becoming a Git Master
Nicola Paolucci
 
Git Distributed Version Control System
Git   Distributed Version Control SystemGit   Distributed Version Control System
Git Distributed Version Control System
Victor Wong
 
Source Code Management Slides
Source Code Management SlidesSource Code Management Slides
Source Code Management Slides
daschuck
 
An intro to git
An intro to gitAn intro to git
An intro to git
Dan Shrader
 
Git workflows presentation
Git workflows presentationGit workflows presentation
Git workflows presentation
Mack Hardy
 
Git 101, or, how to sanely manage your Koha customizations
Git 101, or, how to sanely manage your Koha customizationsGit 101, or, how to sanely manage your Koha customizations
Git 101, or, how to sanely manage your Koha customizations
Ian Walls
 
Source Code Management systems
Source Code Management systemsSource Code Management systems
Source Code Management systems
xSawyer
 
Github By Nyros Developer
Github By Nyros DeveloperGithub By Nyros Developer
Github By Nyros Developer
Nyros Technologies
 
Collaboration With Git and GitHub
Collaboration With Git and GitHubCollaboration With Git and GitHub
Collaboration With Git and GitHub
Alec Clews
 
Git training
Git trainingGit training
Git training
Jérémy Gobet
 
Wokshop de Git
Wokshop de Git Wokshop de Git
Wokshop de Git
Alberto Leal
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
Rick Umali
 
Embracing Distributed Version Control
Embracing Distributed Version ControlEmbracing Distributed Version Control
Embracing Distributed Version Control
Nowell Strite
 
.Git for WordPress Developers
.Git for WordPress Developers.Git for WordPress Developers
.Git for WordPress Developers
mpvanwinkle
 
Becoming a Git Master - Nicola Paolucci
Becoming a Git Master - Nicola PaolucciBecoming a Git Master - Nicola Paolucci
Becoming a Git Master - Nicola Paolucci
Atlassian
 
Git workflows á la-carte, Presenation at jdays2013 www.jdays.se by Nicola Pao...
Git workflows á la-carte, Presenation at jdays2013 www.jdays.se by Nicola Pao...Git workflows á la-carte, Presenation at jdays2013 www.jdays.se by Nicola Pao...
Git workflows á la-carte, Presenation at jdays2013 www.jdays.se by Nicola Pao...
hamidsamadi
 
Git Distributed Version Control System
Git   Distributed Version Control SystemGit   Distributed Version Control System
Git Distributed Version Control System
Victor Wong
 
Source Code Management Slides
Source Code Management SlidesSource Code Management Slides
Source Code Management Slides
daschuck
 
Git workflows presentation
Git workflows presentationGit workflows presentation
Git workflows presentation
Mack Hardy
 
Git 101, or, how to sanely manage your Koha customizations
Git 101, or, how to sanely manage your Koha customizationsGit 101, or, how to sanely manage your Koha customizations
Git 101, or, how to sanely manage your Koha customizations
Ian Walls
 
Source Code Management systems
Source Code Management systemsSource Code Management systems
Source Code Management systems
xSawyer
 
Collaboration With Git and GitHub
Collaboration With Git and GitHubCollaboration With Git and GitHub
Collaboration With Git and GitHub
Alec Clews
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
Rick Umali
 

More from Alex Hillman (7)

Quantifying Community: How We Measure Success in a Coworking Space
Quantifying Community: How We Measure Success in a Coworking SpaceQuantifying Community: How We Measure Success in a Coworking Space
Quantifying Community: How We Measure Success in a Coworking Space
Alex Hillman
 
Philly Pecha Kucha 8 - Game Changers
Philly Pecha Kucha 8 - Game ChangersPhilly Pecha Kucha 8 - Game Changers
Philly Pecha Kucha 8 - Game Changers
Alex Hillman
 
Alex hillman businessweak
Alex hillman businessweakAlex hillman businessweak
Alex hillman businessweak
Alex Hillman
 
Design Philadelphia - Idea Fight Club
Design Philadelphia - Idea Fight ClubDesign Philadelphia - Idea Fight Club
Design Philadelphia - Idea Fight Club
Alex Hillman
 
Social Media for Children's Museum
Social Media for Children's MuseumSocial Media for Children's Museum
Social Media for Children's Museum
Alex Hillman
 
Indy Hall Town Hall
Indy Hall Town HallIndy Hall Town Hall
Indy Hall Town Hall
Alex Hillman
 
IgnitePhilly 6/11
IgnitePhilly 6/11IgnitePhilly 6/11
IgnitePhilly 6/11
Alex Hillman
 
Quantifying Community: How We Measure Success in a Coworking Space
Quantifying Community: How We Measure Success in a Coworking SpaceQuantifying Community: How We Measure Success in a Coworking Space
Quantifying Community: How We Measure Success in a Coworking Space
Alex Hillman
 
Philly Pecha Kucha 8 - Game Changers
Philly Pecha Kucha 8 - Game ChangersPhilly Pecha Kucha 8 - Game Changers
Philly Pecha Kucha 8 - Game Changers
Alex Hillman
 
Alex hillman businessweak
Alex hillman businessweakAlex hillman businessweak
Alex hillman businessweak
Alex Hillman
 
Design Philadelphia - Idea Fight Club
Design Philadelphia - Idea Fight ClubDesign Philadelphia - Idea Fight Club
Design Philadelphia - Idea Fight Club
Alex Hillman
 
Social Media for Children's Museum
Social Media for Children's MuseumSocial Media for Children's Museum
Social Media for Children's Museum
Alex Hillman
 
Indy Hall Town Hall
Indy Hall Town HallIndy Hall Town Hall
Indy Hall Town Hall
Alex Hillman
 

Version Control ThinkVitamin