SlideShare uma empresa Scribd logo
1 de 14
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
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 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.
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
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
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
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
From the command line
git init
(Create file README)
git add README
git commit -m 'first commit'
git remote add origin https://github.com/x/Example1.git
git push -u origin master

(make changes)
git commit –m “Fixed spelling misttake” test.php
git pull
git push
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
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
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
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/
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/

Mais conteúdo relacionado

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

Destaque

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Destaque (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
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
  • 9. From the command line git init (Create file README) git add README git commit -m 'first commit' git remote add origin https://github.com/x/Example1.git git push -u origin master (make changes) git commit –m “Fixed spelling misttake” test.php git pull git 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/