SlideShare a Scribd company logo
1 of 34
20 Essential Commands
Oh Hai! I'm Jeremy Lindblom!
Ø  I work on the AWS SDK for PHP at
Ø  Co-organizer of the Seattle PHP Meetup Group
Ø  B.S. in Computer Science from
Ø  @jeremeamia on
Intro to Version Control
Version Control
•  Also Source Control or Revision Control
•  “any practice that tracks and provides
control over changes to source code”[1]
•  Version control systems ( VCS )
– Git
– SVN
– CVS
– Mercurial
– Perforce
– Clear Case
Vocabulary – Part 1
•  Repository | Repo – Set of current & past
data about the files under version control
•  Revision | Version | Commit – A tracked
change to the repo
•  Working Copy – Local copy of the repo at
a specific revision
•  Head | Tip – The most recent revision
Vocabulary – Part 2
•  Trunk | Mainline | Master – The main
development path of the repo
•  Branch – A divergent development path
of the repo for features, fixes, etc.
•  Merge – Integrate revisions from a
branch back into trunk or other branch
•  Tag – A name or label given to a revision
Centralized VCS
[2]
Distributed VCS (DVCS)
[2]
Git
•  A fast, distributed VCS
•  Free and open source
•  Easy to learn
•  Cheap branching
•  Staging area
•  Local operations
Who is Using Git?
•  Facebook
•  Microsoft
•  Google
•  Amazon
•  Twitter
•  Netflix
•  LinkedIn
•  Zynga
•  Linux
•  Android
•  Ruby on Rails
•  Eclipse
20 Essential Commands
Getting Started
#1.	
  git	
  config	
  
#2.	
  git	
  help	
  
Getting a Repo
#3.	
  git	
  clone	
  
#4.	
  git	
  init	
  
#5.	
  git	
  remote	
  
#6.	
  git	
  fetch	
  
Multiple Remotes
AWS SDK for PHP
Workflow for Making Changes
Making Changes
#7.	
  	
  git	
  pull	
  
#8.	
  	
  git	
  status	
  
#9.	
  	
  git	
  add	
  
#10.	
  git	
  commit	
  
#11.	
  git	
  push	
  
Git Takes Snapshots
Examining Changes
#12.	
  git	
  log	
  
#13.	
  git	
  diff	
  
Undoing Changes
#14.	
  	
  git	
  reset	
  -­‐-­‐hard	
  
#15a.	
  git	
  rm	
  
#15b.	
  git	
  rm	
  -­‐-­‐cached	
  
#16.	
  	
  git	
  clean	
  -­‐fd	
  
Branching
[3]
Branching
#17a.	
  git	
  branch	
  
#17b.	
  git	
  branch	
  -­‐d	
  
#18.	
  	
  git	
  checkout	
  
#19.	
  	
  git	
  merge	
  
Tagging a Release
#20.	
  	
  git	
  tag	
  
#11b.	
  git	
  push	
  -­‐-­‐tags	
  
Tools,Workflows, & GitHub
Git Hosting
Third-party hosting
•  GitHub
•  Gitorious
•  Bitbucket
•  SourceForge
•  Google Code
•  CodePlex
Self-hosting
•  Gitolite
•  Gitosis
Git GUIs
•  git-gui + gitk
•  GitHub for Mac, GitHub for Windows
•  Tower
•  GitBox
•  SourceTree
•  TortoiseGit
•  Your IDE
Popular Workflows
•  git-flow – http://nvie.com/posts/a-
successful-git-branching-model/
•  Github Flow – http://scottchacon.com/
2011/08/31/github-flow.html
git-flow
[4]
AWS SDK for PHP’s Workflow
GitHub
[5]
GitHub Features
•  Nice web interface
•  Facilitates social coding
•  Issue and milestone tracker
•  Wikis and project pages
•  Comments and code reviews
•  Forking and Pull Requests (PRs)
.gitignore
•  Can specify files, paths, or patterns for
Git to ignore (i.e., not track changes)
•  Goes in the root of your repo
*.log	
  
.DS_Store	
  
Thumbs.db	
  
vendor/	
  
Wrapping It Up
•  Git is a free and fast DVCS
•  Git is really popular, especially for OSS
•  You now know 20 Git commands
•  There are lots of tools that support Git
•  GitHub is an awesome Git host with
additional features like forking and PRs
Questions?
Presentation by Jeremy Lindblom – @jeremeamia
References
1.  http://en.wikipedia.org/wiki/Revision_control
2.  http://git-scm.com/book/en/Getting-Started-About-Version-Control
3.  http://hades.name/blog/2010/01/22/git-your-friend-not-foe-vol-2-
branches/
4.  http://nvie.com/posts/a-successful-git-branching-model/
5.  https://github.com/aws/aws-sdk-php

More Related Content

What's hot

Open Source Collaboration With Git And Git Hub
Open Source Collaboration With Git And Git HubOpen Source Collaboration With Git And Git Hub
Open Source Collaboration With Git And Git Hub
Nick Quaranto
 

What's hot (20)

沒有 GUI 的 Git
沒有 GUI 的 Git沒有 GUI 的 Git
沒有 GUI 的 Git
 
Open Source Collaboration With Git And Git Hub
Open Source Collaboration With Git And Git HubOpen Source Collaboration With Git And Git Hub
Open Source Collaboration With Git And Git Hub
 
Up GitLab Presentation 2015
Up GitLab Presentation 2015Up GitLab Presentation 2015
Up GitLab Presentation 2015
 
Git'in in 15
Git'in in 15Git'in in 15
Git'in in 15
 
Starting with Git & GitHub
Starting with Git & GitHubStarting with Git & GitHub
Starting with Git & GitHub
 
Git and Github
Git and GithubGit and Github
Git and Github
 
Git'in on Windows
Git'in on WindowsGit'in on Windows
Git'in on Windows
 
Git
GitGit
Git
 
Git Lab Introduction
Git Lab IntroductionGit Lab Introduction
Git Lab Introduction
 
Open Innovation Lab (OIL) - 20150227 - GIT Intro Workshop
Open Innovation Lab (OIL) - 20150227 - GIT Intro WorkshopOpen Innovation Lab (OIL) - 20150227 - GIT Intro Workshop
Open Innovation Lab (OIL) - 20150227 - GIT Intro Workshop
 
Git best practices 2016
Git best practices 2016Git best practices 2016
Git best practices 2016
 
Introduction to github slideshare
Introduction to github slideshareIntroduction to github slideshare
Introduction to github slideshare
 
Git Basics Philips
Git Basics PhilipsGit Basics Philips
Git Basics Philips
 
Intro to git and git hub
Intro to git and git hubIntro to git and git hub
Intro to git and git hub
 
Git for Beginners
Git for BeginnersGit for Beginners
Git for Beginners
 
Git branching-model
Git branching-modelGit branching-model
Git branching-model
 
Git training
Git trainingGit training
Git training
 
Git and git flow
Git and git flowGit and git flow
Git and git flow
 
Introduction to GitHub
Introduction to GitHubIntroduction to GitHub
Introduction to GitHub
 
Git censored.key
Git censored.keyGit censored.key
Git censored.key
 

Similar to Git Educated About Git - 20 Essential Commands

Davinci git brown_bag
Davinci git brown_bagDavinci git brown_bag
Davinci git brown_bag
Jason Noble
 

Similar to Git Educated About Git - 20 Essential Commands (20)

Git 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using GitGit 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using Git
 
Introduction to git
Introduction to gitIntroduction to git
Introduction to git
 
01 - Git vs SVN
01 - Git vs SVN01 - Git vs SVN
01 - Git vs SVN
 
Introduction into Git
Introduction into GitIntroduction into Git
Introduction into Git
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Git installation and configuration
Git installation and configurationGit installation and configuration
Git installation and configuration
 
Mini-training: Let’s Git It!
Mini-training: Let’s Git It!Mini-training: Let’s Git It!
Mini-training: Let’s Git It!
 
git.ppt.pdf
git.ppt.pdfgit.ppt.pdf
git.ppt.pdf
 
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
 
git Technologies
git Technologiesgit Technologies
git Technologies
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
 
Davinci git brown_bag
Davinci git brown_bagDavinci git brown_bag
Davinci git brown_bag
 
Git Tutorial I
Git Tutorial IGit Tutorial I
Git Tutorial I
 
GIT.pptx
GIT.pptxGIT.pptx
GIT.pptx
 
Let's Git this Party Started: An Introduction to Git and GitHub
Let's Git this Party Started: An Introduction to Git and GitHubLet's Git this Party Started: An Introduction to Git and GitHub
Let's Git this Party Started: An Introduction to Git and GitHub
 
Git & GitHub N00bs
Git & GitHub N00bsGit & GitHub N00bs
Git & GitHub N00bs
 
ePOM - Fundamentals of Research Software Development - Code Version Control
ePOM - Fundamentals of Research Software Development - Code Version ControlePOM - Fundamentals of Research Software Development - Code Version Control
ePOM - Fundamentals of Research Software Development - Code Version Control
 
The Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHubThe Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHub
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
 
Git version control and trunk based approach with VSTS
Git version control and trunk based approach with VSTSGit version control and trunk based approach with VSTS
Git version control and trunk based approach with VSTS
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
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...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
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
 
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
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
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
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 

Git Educated About Git - 20 Essential Commands

Editor's Notes

  1. Good evening everyone! I'm glad that you could all be here for our AWS night. Please help yourself to some pizza and drinks if you haven't already. I'm Jeremy, and tonight I want to introduce you to Amazon Web Services and specifically the new AWS SDK for PHP, which we released in the beginning of November. Tonight I will show you how to install it, and I'll cover some of the new features of the SDK, and also demonstrate how it can be used in your applications.
  2. Good evening everyone! I'm glad that you could all be here for our AWS night. Please help yourself to some pizza and drinks if you haven't already. I'm Jeremy, and tonight I want to introduce you to Amazon Web Services and specifically the new AWS SDK for PHP, which we released in the beginning of November. Tonight I will show you how to install it, and I'll cover some of the new features of the SDK, and also demonstrate how it can be used in your applications.
  3. Good evening everyone! I'm glad that you could all be here for our AWS night. Please help yourself to some pizza and drinks if you haven't already. I'm Jeremy, and tonight I want to introduce you to Amazon Web Services and specifically the new AWS SDK for PHP, which we released in the beginning of November. Tonight I will show you how to install it, and I'll cover some of the new features of the SDK, and also demonstrate how it can be used in your applications.
  4. Good evening everyone! I'm glad that you could all be here for our AWS night. Please help yourself to some pizza and drinks if you haven't already. I'm Jeremy, and tonight I want to introduce you to Amazon Web Services and specifically the new AWS SDK for PHP, which we released in the beginning of November. Tonight I will show you how to install it, and I'll cover some of the new features of the SDK, and also demonstrate how it can be used in your applications.
  5. Good evening everyone! I'm glad that you could all be here for our AWS night. Please help yourself to some pizza and drinks if you haven't already. I'm Jeremy, and tonight I want to introduce you to Amazon Web Services and specifically the new AWS SDK for PHP, which we released in the beginning of November. Tonight I will show you how to install it, and I'll cover some of the new features of the SDK, and also demonstrate how it can be used in your applications.