• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
How To Git With The Program - Using Git for Version Control
 

How To Git With The Program - Using Git for Version Control

on

  • 1,795 views

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 ...

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.

Statistics

Views

Total Views
1,795
Views on SlideShare
1,651
Embed Views
144

Actions

Likes
2
Downloads
11
Comments
0

6 Embeds 144

http://www.scoop.it 133
https://si0.twimg.com 5
https://abs.twimg.com 3
http://pinterest.com 1
https://twitter.com 1
http://www.pinterest.com 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    How To Git With The Program - Using Git for Version Control How To Git With The Program - Using Git for Version Control Presentation Transcript

    • Introduction0 Brian Layman0 Twitter/Skype: @BrianLayman ( uɐɯʎɐ7 uɐıɹq )What I do:0 Security Reviews of Plugins & Servers0 Site Optimization0 Hacked Site Rescue0 Custom Plugin Creation0 Managed WordPress Hosting
    • 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
    • What about CVS & SVN?0 Concurrent Versions System and SubVersioN0 Not predecessors. They are similar but not the same thing as Git0 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 / REDUNDANT0 SVN is simply not as advanced and “fakes” some of the standard VCS features.
    • Basic Terms0 Repository – Your project & its history0 Branch – A separate and unique version of your code0 Tag – Your branch/repo at a specific point in time.0 Clone (Checkout in SVN) – Make your repo local0 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 server0 Pull (Update in SVN) – Bring in changes from a server0 Revert (Git Only) – Undo a local commit0 Checkout (Revert in SVN)- Get a specific server revision
    • Other Terms0 Snapshots – Local commits0 Remote – Any other server with the current repository0 Diff – Compare two file versions0 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 files0 Log – All of the recent commits - Notice commits are not named by a number but by a sha-1 hash that look like: a31e2253e16e2c154d01a70c3d7b12b4c57ea0a4
    • One Final Term: GitHub0 The most common Git repository server0 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 graphs0 Watch people and project0 Private Repositories with role management
    • Basic Work Flow0 Create a Repository0 Add a readme file to the repository0 Commit the change with a comment (locally)0 Connect the repository to a remote server0 Push the change to the remote.0 Make Changes0 Commit (Repeat)0 Pull updates from the server0 Push
    • From the command linegit init(Create file README)git add READMEgit commit -m first commitgit remote add origin https://github.com/x/Example1.gitgit push -u origin master(make changes)git commit –m “Fixed spelling misttake” test.phpgit pullgit push
    • Graphical UIs0 Native GitHub Mac/Windows/Android programs0 On Windows there is SmartGit and TortoiseGit.0 Lots more: http://bit.ly/GitUIs (mixed case)0 Demonstrations
    • BeanStalk App0 http://beanstalkapp.com0 Provides Git or SVN repositories0 Provides Automatic Deployment to various servers when a push is made to a specific branch0 This allows a two tier staging and production system with automatic deployment0 Incident Tracking0 Notification system (can use Google Talk)0 Demonstrations
    • Command Line Goodies0 git fetch – Shows what will come down with a pull0 git reset HEAD README – Unstage the last commit0 git checkout -- README – Revert file README0 git revert – Commit changes to undo last commits0 git commit –amend – Modify the last commit0 git blame – Determine who made a specific change
    • Questions?0 Lots of information is in the Pro Git book for free at: http://git-scm.com/documentation0 More Documentation: http://gitref.org/0 BeanStalk App/Google Talk deployment notifications: https://github.com/brianlayman/Google-Talk- Notifications0 Cheat Sheets: 0 http://zrusin.blogspot.com/2007/09/git-cheat-sheet.html 0 http://blog.fournova.com/2011/06/git-cheat-sheet/
    • Thank You!Brian Layman – Brian@eHermitsInc.comA 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/