SlideShare a Scribd company logo
1 of 47
Improve Your Development
Process with Git
Lachlan Hardy




@lachlanhardy
What is Git?
• Open source
What is Git?
• Open source
• Distributed version control system
What is Git?
• Open source
• Distributed version control system
• Designed for speed and efficiency
What is Git?
Open source - git-scm.com
What is Git?
Distributed
• local copy is a full copy
What is Git?
Distributed
• local copy is a full copy
• local copy is a backup
What is Git?
Distributed
• local copy is a full copy
• local copy is a backup
• commit to local copy
What is Git?
Distributed
•   local copy is a full copy
•   local copy is a backup
•   commit to local copy
•   work offline
What is Git?
Work offline
• perform diffs
What is Git?
Work offline
• perform diffs
• commit changes
What is Git?
Work offline
• perform diffs
• commit changes
• switch branches
What is Git?
Work offline
•   perform diffs
•   commit changes
•   switch branches
•   merge branches
What is Git?
Speed and Efficiency
• Snapshots, not deltas
What is Git?
Speed and Efficiency
• Snapshots, not deltas
• Commit-based logic
What is Git?
Speed and Efficiency
• Snapshots, not deltas
• Commit-based logic
• Each commit has access to full history
Setting up a repository
Configuration
• $ git config --global user.name “Lachlan Hardy”
• $ git config --global user.email
  “lhardy@atlassian.com”
Setting up a repository
Create
• $ cd example/
• $ git init
• master $ touch README
• master $ git add .
• master $ git commit -m “This is my first commit.”
Setting up a repository
Clone
• $ git clone git://example.com/repository/
  example.git
• $ cd example/
Developer Workflow
• Topic Branching
Developer Workflow
• Topic Branching
• Commit work locally
Developer Workflow
• Topic Branching
• Commit work locally
• Update local copy
Developer Workflow
•   Topic Branching
•   Commit work locally
•   Update local copy
•   Merge work to trunk and push to server
Developer Workflow
Topic Branching
• master $ git pull origin master
Developer Workflow
Topic Branching
• master $ git pull origin master
• master $ git checkout -b new-feature
Developer Workflow
Topic Branching
• master $ git pull origin master
• master $ git checkout -b new-feature
• new-feature $ ...do some stuff...
Developer Workflow
Commit work locally
• new-feature $ git status
Developer Workflow
Commit work locally
• new-feature $ git status
• new-feature $ git add changed-file.txt
Developer Workflow
Commit work locally
• new-feature $ git status
• new-feature $ git add changed-file.txt
• new-feature $ git commit -a “I changed a file”
Developer Workflow
Update local copy
• new-feature $ git checkout master
Developer Workflow
Update local copy
• new-feature $ git checkout master
• master $ git pull origin master
Developer Workflow
Merge work to trunk and push to
 server
• master $ git merge new-feature
Developer Workflow
Merge work to trunk and push to
 server
• master $ git merge new-feature
• master $ git push origin master
Working in a team
• Work locally
Working in a team
• Work locally
• Share work without a server
Working in a team
• Work locally
• Share work without a server
• Test code locally in isolation
Working in a team
•   Work locally
•   Share work without a server
•   Test code locally in isolation
•   Commit to the server without breaking
    builds
Working in a team
• Work locally
• Share work without a server
• Test code locally in isolation
• Commit to the server without breaking
  builds
• A broken build doesn’t stop development
Questions?
• lachlan@lachstock.com.au
• @lachlanhardy
• http://git-scm.com/

More Related Content

More from Lachlan Hardy

Give Your JavaScript Apps Some Spine
Give Your JavaScript Apps Some SpineGive Your JavaScript Apps Some Spine
Give Your JavaScript Apps Some Spine
Lachlan Hardy
 

More from Lachlan Hardy (12)

Give Your JavaScript Apps Some Spine
Give Your JavaScript Apps Some SpineGive Your JavaScript Apps Some Spine
Give Your JavaScript Apps Some Spine
 
Give Your JavaScript Apps A Spine
Give Your JavaScript Apps A SpineGive Your JavaScript Apps A Spine
Give Your JavaScript Apps A Spine
 
SydJS.com
SydJS.comSydJS.com
SydJS.com
 
Yql && Raphaël
Yql && RaphaëlYql && Raphaël
Yql && Raphaël
 
GitHub for JavaScripters
GitHub for JavaScriptersGitHub for JavaScripters
GitHub for JavaScripters
 
The Open Web
The Open WebThe Open Web
The Open Web
 
Serving Code Samples
Serving Code SamplesServing Code Samples
Serving Code Samples
 
The Open Web
The Open WebThe Open Web
The Open Web
 
The Open Web
The Open WebThe Open Web
The Open Web
 
Improving Dashboards with open content sharing
Improving Dashboards with open content sharingImproving Dashboards with open content sharing
Improving Dashboards with open content sharing
 
Local Government on the Open Web
Local Government on the Open WebLocal Government on the Open Web
Local Government on the Open Web
 
Welcome to IE8 - Integrating Your Site With Internet Explorer 8
Welcome to IE8 - Integrating Your Site With Internet Explorer 8Welcome to IE8 - Integrating Your Site With Internet Explorer 8
Welcome to IE8 - Integrating Your Site With Internet Explorer 8
 

Recently uploaded

+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@
 

Recently uploaded (20)

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
+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...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
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...
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
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...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
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
 
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
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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
 
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
 

Improve Your Development Process with Git

Editor's Notes