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

Recently uploaded (20)

Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
 
Navigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern EnterpriseNavigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern Enterprise
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps Productivity
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
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
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software Engineering
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cf
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
API Governance and Monetization - The evolution of API governance
API Governance and Monetization -  The evolution of API governanceAPI Governance and Monetization -  The evolution of API governance
API Governance and Monetization - The evolution of API governance
 

Improve Your Development Process with Git

Editor's Notes