This presentation is a practical guide to the use of a Version Control System (VCS) to keep your theme, plugin, website, or project safe. You will learn the basic concepts common to version control programs like Git, Subversion and Mercurial in both a team and individual development settings. The unique aspects and advantages of using Git will also be covered, including the social aspect of revision control provided by GitHub.
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
How To Git With The Program - Using Git for Version Control
1.
2. Introduction
0 Brian Layman
0 Twitter/Skype: @BrianLayman ( uɐɯʎɐ7 uɐıɹq )
What I do:
0 Security Reviews of Plugins & Servers
0 Site Optimization
0 Hacked Site Rescue
0 Custom Plugin Creation
0 Managed WordPress Hosting
3. What Is Git?
0 More than just a Version Control System (VCS)
“GitHub helps people build software together.”
0 Allows you to track and undo changes.
0 Allows multiple people to work on the same code at
once.
0 Allows you to make changes to multiple versions of a
your software.
0 Allows you to deploy software to multiple servers.
0 Makes Code Development Social through
0 Notifications, Comments, Wiki & Graphs
4. What about CVS & SVN?
0 Concurrent Versions System and SubVersioN
0 Not predecessors. They are similar but not the same
thing as Git
0 SVN is a centralized hub/wheel approach (CVCS)
0 Git (like Mercurial) is a Distributed VCS (DVCS)
0 You are working with your own copy of the repo
0 You can commit to other “servers”
0 FAST / OFFLINE / REDUNDANT
0 SVN is simply not as advanced and “fakes” some of
the standard VCS features.
5. Basic Terms
0 Repository – Your project & its history
0 Branch – A separate and unique version of your code
0 Tag – Your branch/repo at a specific point in time.
0 Clone (Checkout in SVN) – Make your repo local
0 Add – Start Tracking another file/tree.
0 Commit (Git Only) –Add your changes to your local repo.
0 Push (Commit in SVN) – Add your changes to a server
0 Pull (Update in SVN) – Bring in changes from a server
0 Revert (Git Only) – Undo a local commit
0 Checkout (Revert in SVN)- Get a specific server revision
6. Other Terms
0 Snapshots – Local commits
0 Remote – Any other server with the current repository
0 Diff – Compare two file versions
0 Conflict – When a server has a different change to a line
that is changed on your local computer.
0 Merge – Bring the changes from one branch into your local
branch (in SVN this is called PAIN)
0 Status – Shows the current state of the files
0 Log – All of the recent commits - Notice commits are not
named by a number but by a sha-1 hash that look like:
a31e2253e16e2c154d01a70c3d7b12b4c57ea0a4
7. One Final Term: GitHub
0 The most common Git repository server
0 4 Days ago GitHub raise $100 Million Dollars
(You’ve just gotta raise your pinky as you say that!)
0 Provides a social aspect to coding
0 News Feed & history
0 Issue Tracking
0 Every Project gets a wiki
0 Commenting on commits
0 Pull requests & code submission
0 Fork tracking & usage graphs
0 Watch people and project
0 Private Repositories with role management
8. Basic Work Flow
0 Create a Repository
0 Add a readme file to the repository
0 Commit the change with a comment (locally)
0 Connect the repository to a remote server
0 Push the change to the remote.
0 Make Changes
0 Commit (Repeat)
0 Pull updates from the server
0 Push
10. Graphical UIs
0 Native GitHub Mac/Windows/Android programs
0 On Windows there is SmartGit and TortoiseGit.
0 Lots more: http://bit.ly/GitUIs (mixed case)
0 Demonstrations
11. BeanStalk App
0 http://beanstalkapp.com
0 Provides Git or SVN repositories
0 Provides Automatic Deployment to various servers
when a push is made to a specific branch
0 This allows a two tier staging and production system
with automatic deployment
0 Incident Tracking
0 Notification system (can use Google Talk)
0 Demonstrations
12. Command Line Goodies
0 git fetch – Shows what will come down with a pull
0 git reset HEAD README – Unstage the last commit
0 git checkout -- README – Revert file README
0 git revert – Commit changes to undo last commits
0 git commit –amend – Modify the last commit
0 git blame – Determine who made a specific change
13. Questions?
0 Lots of information is in the Pro Git book for free at:
http://git-scm.com/documentation
0 More Documentation: http://gitref.org/
0 BeanStalk App/Google Talk deployment notifications:
https://github.com/brianlayman/Google-Talk-
Notifications
0 Cheat Sheets:
0 http://zrusin.blogspot.com/2007/09/git-cheat-sheet.html
0 http://blog.fournova.com/2011/06/git-cheat-sheet/
14. Thank You!
Brian Layman – Brian@eHermitsInc.com
A gazillion ways to reach me:
0 http://eHermitsInc.com
0 http://TheCodeCave.com
0 http://Twitter.com/BrianLayman
0 http://www.facebook.com/ehermit
0 http://github.com/BrianLayman
0 http://www.linkedin.com/in/brianlayman
0 http://profiles.wordpress.org/brianlayman/
0 http://www.meetup.com/NEOWordPress/