SlideShare a Scribd company logo
1 of 30
© 2013 KMS Technology
BOOST YOUR DEV TEAM’S SPEED
AND PRODUCTIVITY
Duy Lam .::. Aug 2013
© 2013 KMS Technology 2
AGENDA
© 2013 KMS Technology 3
Git
Introduction
Branch in Git Remote Git Git Practices
ABOUT ME
Software Architect
at KMS Technology Vietnam
duylam@kms-technology.com
http://vn.linkedin.com/in/duylamphuong
© 2013 KMS Technology 4
Lâm Phương Duy
WHAT YOU TAKE IN THE END
Git
Use Git
Use Git Effectively
Git for advanced needs
Git or else?
© 2013 KMS Technology 5
AGENDA
© 2013 KMS Technology 6
Git
Introduction
Branch in Git Remote Git Git Practices
VERSION CONTROL SYSTEM TYPES
© 2013 KMS Technology 7
Centralized Version
Control System
Distributed Version
Control System
THREE GIT TRAITS
#1 COMMITS ARE SNAPSHOT
© 2013 KMS Technology 8
THREE GIT TRAITS
#2 WORK WITHOUT NETWORK
© 2013 KMS Technology 9
THREE GIT TRAITS
#3 TWO STATES
© 2013 KMS Technology 10
Working Directory Git Repository
git add
git rm
etc.
git commit
Git Index / Staging
Area
BASIC WORKS
(DEMO)
 Create new git repository
 Work on git staging area
 Update git repository
 Check status
 Undo
© 2013 KMS Technology 11
AGENDA
© 2013 KMS Technology 12
Git
Introduction
Branch in Git Remote Git Git Practices
BRANCH AND HOW IT WORKS
© 2013 KMS Technology 13
1 2
3
4
MERGING BRANCH
FAST FORWARD
© 2013 KMS Technology 14
git merge hotfix
MERGING BRANCH
NON FAST FORWARD
© 2013 KMS Technology 15
git merge iss53
AGENDA
© 2013 KMS Technology 16
Git
Introduction
Branch in Git Remote Git Git Practices
REMOTE URLS
© 2013 KMS Technology 17
Local /data/git/project.git
SSH*
user@server:project.git
Git git://server/project.git
HTTP http://server/project.git
(*) Setup authentication: https://help.github.com/articles/generating-ssh-keys
REMOTE BRANCH
© 2013 KMS Technology 18
Time
REMOTE TRACKING BRANCH
 a local branch associated with remote branch
© 2013 KMS Technology 19
> git branch --track [branch] [remote name]/[branch]
UPDATE WITH REMOTE REPOSITORY
GET CHANGES #1
© 2013 KMS Technology 20
Time
git fetch origin
UPDATE WITH REMOTE REPOSITORY
GET CHANGES #2
© 2013 KMS Technology 21
Time
git pull origin
master
origin/master
UPDATE WITH REMOTE REPOSITORY
SAVE CHANGES
© 2013 KMS Technology 22
masterorigin/master
git.ourcompany.com
Time
master
masterorigin/master
git push origin
BASIC WORKS
(DEMO)
 Create remote git repository
 Get new commits from remote repository
 Save new commits to remote repository
© 2013 KMS Technology 23
AGENDA
© 2013 KMS Technology 24
Git
Introduction
Branch in Git Remote Git Git Practices
HIGHLIGHT OF GIT FEATURES
(DEMO)
 git tag
 git stash
 git submodule
© 2013 KMS Technology 25
GIT CLIENTS
 http://git-scm.com: Git CLI (command line
interface)
 UI clients
– TortoiseGit
– SmartGit
– SourceTree Free
– Git Extensions
© 2013 KMS Technology 26
GIT OR SVN ?
Speed of operation Faster
Data loss Less
Independent and isolated environment Yes
Access control Yes
Locking mechanisms Yes
Storage space 1/30 size
© 2013 KMS Technology 27
GIT PRACTICES
 Line-ending issue on platforms
 Do not miss any file when committing in
conflicted merge
© 2013 KMS Technology 28
Windows Mac & Linux
Problem rn n
Solution git config --global core.autocrlf true git config --global core.autocrlf input
GIT PRACTICES
© 2013 KMS Technology 29
 Prefer --no-ff option on merging
© 2013 KMS Technology 30
Thank You

More Related Content

What's hot

What's hot (20)

From Monolith to K8s - Spring One 2020
From Monolith to K8s - Spring One 2020From Monolith to K8s - Spring One 2020
From Monolith to K8s - Spring One 2020
 
Github mike mottola_good15
Github mike mottola_good15Github mike mottola_good15
Github mike mottola_good15
 
What's New for GitLab CI/CD February 2020
What's New for GitLab CI/CD February 2020What's New for GitLab CI/CD February 2020
What's New for GitLab CI/CD February 2020
 
Team Collaboration with GitHub
Team Collaboration with GitHubTeam Collaboration with GitHub
Team Collaboration with GitHub
 
WKP 2.4 Delivers GitOps Anywhere
WKP 2.4 Delivers GitOps AnywhereWKP 2.4 Delivers GitOps Anywhere
WKP 2.4 Delivers GitOps Anywhere
 
Gerrit Code Review migrations step-by-step
Gerrit Code Review migrations step-by-stepGerrit Code Review migrations step-by-step
Gerrit Code Review migrations step-by-step
 
Oleksandr Loktionov - Agile in a nutshell
Oleksandr Loktionov - Agile in a nutshellOleksandr Loktionov - Agile in a nutshell
Oleksandr Loktionov - Agile in a nutshell
 
QCon Plus From monoliths to k8s - Workshop
QCon Plus From monoliths to k8s - WorkshopQCon Plus From monoliths to k8s - Workshop
QCon Plus From monoliths to k8s - Workshop
 
Introducing GitLab (September 2018)
Introducing GitLab (September 2018)Introducing GitLab (September 2018)
Introducing GitLab (September 2018)
 
Meetup 23 - 03 - Application Delivery on K8S with GitOps
Meetup 23 - 03 - Application Delivery on K8S with GitOpsMeetup 23 - 03 - Application Delivery on K8S with GitOps
Meetup 23 - 03 - Application Delivery on K8S with GitOps
 
Container world 2019 Canary Release
Container world 2019 Canary ReleaseContainer world 2019 Canary Release
Container world 2019 Canary Release
 
Gerrit Analytics applied to Android source code
Gerrit Analytics applied to Android source codeGerrit Analytics applied to Android source code
Gerrit Analytics applied to Android source code
 
Orchestrating Microservices
Orchestrating MicroservicesOrchestrating Microservices
Orchestrating Microservices
 
Modernising Android Architecture Using MVVM and Android Architecture Components
Modernising Android Architecture Using MVVM and Android Architecture ComponentsModernising Android Architecture Using MVVM and Android Architecture Components
Modernising Android Architecture Using MVVM and Android Architecture Components
 
Gerrit & Jenkins Workflow: An Integrated CI Demonstration
Gerrit & Jenkins Workflow: An Integrated CI DemonstrationGerrit & Jenkins Workflow: An Integrated CI Demonstration
Gerrit & Jenkins Workflow: An Integrated CI Demonstration
 
Git & GitLab
Git & GitLabGit & GitLab
Git & GitLab
 
Look into Sitecore 8.2 - September Meetup 2016 - Sitecore User Group Sri Lanka
Look into Sitecore 8.2 - September Meetup 2016 - Sitecore User Group Sri LankaLook into Sitecore 8.2 - September Meetup 2016 - Sitecore User Group Sri Lanka
Look into Sitecore 8.2 - September Meetup 2016 - Sitecore User Group Sri Lanka
 
Gerrit Code Review multi-site
Gerrit Code Review multi-siteGerrit Code Review multi-site
Gerrit Code Review multi-site
 
EGit and Friends - Ready for Prime Time ? Eclipse DemoCamp Darmstadt 2011-06-21
EGit and Friends - Ready for Prime Time ? Eclipse DemoCamp Darmstadt 2011-06-21EGit and Friends - Ready for Prime Time ? Eclipse DemoCamp Darmstadt 2011-06-21
EGit and Friends - Ready for Prime Time ? Eclipse DemoCamp Darmstadt 2011-06-21
 
Git Watch
Git WatchGit Watch
Git Watch
 

Viewers also liked

Ntt Data Advisory & Interactive 20120529
Ntt Data Advisory & Interactive 20120529Ntt Data Advisory & Interactive 20120529
Ntt Data Advisory & Interactive 20120529
Dana Helland
 

Viewers also liked (19)

Using Story in UX
Using Story in UXUsing Story in UX
Using Story in UX
 
Eric Cleaver White Design / KMS Celebration Preso
Eric Cleaver White Design / KMS Celebration PresoEric Cleaver White Design / KMS Celebration Preso
Eric Cleaver White Design / KMS Celebration Preso
 
Some simple tips for front-end performance in WordPress
Some simple tips for front-end performance in WordPressSome simple tips for front-end performance in WordPress
Some simple tips for front-end performance in WordPress
 
The State of Front End Web Development 2011
The State of Front End Web Development 2011The State of Front End Web Development 2011
The State of Front End Web Development 2011
 
Ntt Data Advisory & Interactive 20120529
Ntt Data Advisory & Interactive 20120529Ntt Data Advisory & Interactive 20120529
Ntt Data Advisory & Interactive 20120529
 
Retail Displays - Front End Merchandising Trend 2011
Retail Displays - Front End Merchandising Trend 2011Retail Displays - Front End Merchandising Trend 2011
Retail Displays - Front End Merchandising Trend 2011
 
UXify 2015 - Front-end Developers' Checklist for Better UX
UXify 2015 - Front-end Developers' Checklist for Better UXUXify 2015 - Front-end Developers' Checklist for Better UX
UXify 2015 - Front-end Developers' Checklist for Better UX
 
Front-end architecture for cloud applications and Polymer
Front-end architecture for cloud applications and PolymerFront-end architecture for cloud applications and Polymer
Front-end architecture for cloud applications and Polymer
 
KMS Introduction
KMS IntroductionKMS Introduction
KMS Introduction
 
Front End Development in Magento
Front End Development in MagentoFront End Development in Magento
Front End Development in Magento
 
성공적인 서비스로의 플랫폼 선택
성공적인 서비스로의 플랫폼 선택성공적인 서비스로의 플랫폼 선택
성공적인 서비스로의 플랫폼 선택
 
Front End Development - Beyond Javascript (Robin Cannon)
Front End Development - Beyond Javascript (Robin Cannon)Front End Development - Beyond Javascript (Robin Cannon)
Front End Development - Beyond Javascript (Robin Cannon)
 
Introduction to Front End Engineering
Introduction to Front End EngineeringIntroduction to Front End Engineering
Introduction to Front End Engineering
 
Technology Trends in 2013-2014
Technology Trends in 2013-2014Technology Trends in 2013-2014
Technology Trends in 2013-2014
 
UX, Front-end and Back-end: How front-end can help these guys?
UX, Front-end and Back-end: How front-end can help these guys?UX, Front-end and Back-end: How front-end can help these guys?
UX, Front-end and Back-end: How front-end can help these guys?
 
Front End Best Practices
Front End Best PracticesFront End Best Practices
Front End Best Practices
 
Designing for mobile. A UX perspective for developers
Designing for mobile. A UX perspective for developersDesigning for mobile. A UX perspective for developers
Designing for mobile. A UX perspective for developers
 
ブロックチェーンの仕組みと動向(入門編)
ブロックチェーンの仕組みと動向(入門編)ブロックチェーンの仕組みと動向(入門編)
ブロックチェーンの仕組みと動向(入門編)
 
Code with Empathy: UX for Engineers and UX Developers
Code with Empathy: UX for Engineers and UX DevelopersCode with Empathy: UX for Engineers and UX Developers
Code with Empathy: UX for Engineers and UX Developers
 

Similar to [HCM-August 13] Tech Talk on Git: Use Git to Boost Your Dev Team's Speed and Productivity

Using Git and BitBucket
Using Git and BitBucketUsing Git and BitBucket
Using Git and BitBucket
Medhat Dawoud
 

Similar to [HCM-August 13] Tech Talk on Git: Use Git to Boost Your Dev Team's Speed and Productivity (20)

JAZOON'13 - Thomas Hug & Bartosz Majsak - Git Workshop -Essentials
JAZOON'13 - Thomas Hug & Bartosz Majsak - Git Workshop -EssentialsJAZOON'13 - Thomas Hug & Bartosz Majsak - Git Workshop -Essentials
JAZOON'13 - Thomas Hug & Bartosz Majsak - Git Workshop -Essentials
 
Digdag Updates 2020 July
Digdag Updates 2020 JulyDigdag Updates 2020 July
Digdag Updates 2020 July
 
Github By Nyros Developer
Github By Nyros DeveloperGithub By Nyros Developer
Github By Nyros Developer
 
Gitops Hands On
Gitops Hands OnGitops Hands On
Gitops Hands On
 
Webinar: End to End Security & Operations with Chainguard and Weave GitOps
Webinar: End to End Security & Operations with Chainguard and Weave GitOpsWebinar: End to End Security & Operations with Chainguard and Weave GitOps
Webinar: End to End Security & Operations with Chainguard and Weave GitOps
 
Frontend DevOps Cycle using GitLab
Frontend DevOps Cycle using GitLabFrontend DevOps Cycle using GitLab
Frontend DevOps Cycle using GitLab
 
Scaling Prometheus Metrics in Kubernetes with Telegraf | Chris Goller | Influ...
Scaling Prometheus Metrics in Kubernetes with Telegraf | Chris Goller | Influ...Scaling Prometheus Metrics in Kubernetes with Telegraf | Chris Goller | Influ...
Scaling Prometheus Metrics in Kubernetes with Telegraf | Chris Goller | Influ...
 
Development with Git and Gerrit - Eclipse DemoCamp Stuttgart - 2010-11-23
Development with Git and Gerrit - Eclipse DemoCamp Stuttgart - 2010-11-23Development with Git and Gerrit - Eclipse DemoCamp Stuttgart - 2010-11-23
Development with Git and Gerrit - Eclipse DemoCamp Stuttgart - 2010-11-23
 
IntroductionGit
IntroductionGitIntroductionGit
IntroductionGit
 
Twelve Tasks Made Easier with IBM Domino XPages
Twelve Tasks Made Easier with IBM Domino XPagesTwelve Tasks Made Easier with IBM Domino XPages
Twelve Tasks Made Easier with IBM Domino XPages
 
TIMES cloud Service TIMES/MIRO App
TIMES cloud Service  TIMES/MIRO AppTIMES cloud Service  TIMES/MIRO App
TIMES cloud Service TIMES/MIRO App
 
Git
GitGit
Git
 
Intro to Git Devnet-1080 Cisco Live 2018
Intro to Git Devnet-1080 Cisco Live 2018Intro to Git Devnet-1080 Cisco Live 2018
Intro to Git Devnet-1080 Cisco Live 2018
 
Git ops & Continuous Infrastructure with terra*
Git ops  & Continuous Infrastructure with terra*Git ops  & Continuous Infrastructure with terra*
Git ops & Continuous Infrastructure with terra*
 
Plastic SCM: Entreprise Version Control Platform for Modern Applications and ...
Plastic SCM: Entreprise Version Control Platform for Modern Applications and ...Plastic SCM: Entreprise Version Control Platform for Modern Applications and ...
Plastic SCM: Entreprise Version Control Platform for Modern Applications and ...
 
GoGrid Webinar: Complex Infrastructure Made Easy - Learn How You Can Leverage...
GoGrid Webinar: Complex Infrastructure Made Easy - Learn How You Can Leverage...GoGrid Webinar: Complex Infrastructure Made Easy - Learn How You Can Leverage...
GoGrid Webinar: Complex Infrastructure Made Easy - Learn How You Can Leverage...
 
Git from the trenches
Git from the trenchesGit from the trenches
Git from the trenches
 
Git Version Control System
Git Version Control SystemGit Version Control System
Git Version Control System
 
Git dvcs and Information Security Review
Git dvcs and Information Security ReviewGit dvcs and Information Security Review
Git dvcs and Information Security Review
 
Using Git and BitBucket
Using Git and BitBucketUsing Git and BitBucket
Using Git and BitBucket
 

Recently uploaded

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

Recently uploaded (20)

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
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
 
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
 
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
 
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
 
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
 
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
 
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, ...
 
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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - 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
 
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)
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
+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...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 

[HCM-August 13] Tech Talk on Git: Use Git to Boost Your Dev Team's Speed and Productivity

  • 1. © 2013 KMS Technology
  • 2. BOOST YOUR DEV TEAM’S SPEED AND PRODUCTIVITY Duy Lam .::. Aug 2013 © 2013 KMS Technology 2
  • 3. AGENDA © 2013 KMS Technology 3 Git Introduction Branch in Git Remote Git Git Practices
  • 4. ABOUT ME Software Architect at KMS Technology Vietnam duylam@kms-technology.com http://vn.linkedin.com/in/duylamphuong © 2013 KMS Technology 4 Lâm Phương Duy
  • 5. WHAT YOU TAKE IN THE END Git Use Git Use Git Effectively Git for advanced needs Git or else? © 2013 KMS Technology 5
  • 6. AGENDA © 2013 KMS Technology 6 Git Introduction Branch in Git Remote Git Git Practices
  • 7. VERSION CONTROL SYSTEM TYPES © 2013 KMS Technology 7 Centralized Version Control System Distributed Version Control System
  • 8. THREE GIT TRAITS #1 COMMITS ARE SNAPSHOT © 2013 KMS Technology 8
  • 9. THREE GIT TRAITS #2 WORK WITHOUT NETWORK © 2013 KMS Technology 9
  • 10. THREE GIT TRAITS #3 TWO STATES © 2013 KMS Technology 10 Working Directory Git Repository git add git rm etc. git commit Git Index / Staging Area
  • 11. BASIC WORKS (DEMO)  Create new git repository  Work on git staging area  Update git repository  Check status  Undo © 2013 KMS Technology 11
  • 12. AGENDA © 2013 KMS Technology 12 Git Introduction Branch in Git Remote Git Git Practices
  • 13. BRANCH AND HOW IT WORKS © 2013 KMS Technology 13 1 2 3 4
  • 14. MERGING BRANCH FAST FORWARD © 2013 KMS Technology 14 git merge hotfix
  • 15. MERGING BRANCH NON FAST FORWARD © 2013 KMS Technology 15 git merge iss53
  • 16. AGENDA © 2013 KMS Technology 16 Git Introduction Branch in Git Remote Git Git Practices
  • 17. REMOTE URLS © 2013 KMS Technology 17 Local /data/git/project.git SSH* user@server:project.git Git git://server/project.git HTTP http://server/project.git (*) Setup authentication: https://help.github.com/articles/generating-ssh-keys
  • 18. REMOTE BRANCH © 2013 KMS Technology 18 Time
  • 19. REMOTE TRACKING BRANCH  a local branch associated with remote branch © 2013 KMS Technology 19 > git branch --track [branch] [remote name]/[branch]
  • 20. UPDATE WITH REMOTE REPOSITORY GET CHANGES #1 © 2013 KMS Technology 20 Time git fetch origin
  • 21. UPDATE WITH REMOTE REPOSITORY GET CHANGES #2 © 2013 KMS Technology 21 Time git pull origin master origin/master
  • 22. UPDATE WITH REMOTE REPOSITORY SAVE CHANGES © 2013 KMS Technology 22 masterorigin/master git.ourcompany.com Time master masterorigin/master git push origin
  • 23. BASIC WORKS (DEMO)  Create remote git repository  Get new commits from remote repository  Save new commits to remote repository © 2013 KMS Technology 23
  • 24. AGENDA © 2013 KMS Technology 24 Git Introduction Branch in Git Remote Git Git Practices
  • 25. HIGHLIGHT OF GIT FEATURES (DEMO)  git tag  git stash  git submodule © 2013 KMS Technology 25
  • 26. GIT CLIENTS  http://git-scm.com: Git CLI (command line interface)  UI clients – TortoiseGit – SmartGit – SourceTree Free – Git Extensions © 2013 KMS Technology 26
  • 27. GIT OR SVN ? Speed of operation Faster Data loss Less Independent and isolated environment Yes Access control Yes Locking mechanisms Yes Storage space 1/30 size © 2013 KMS Technology 27
  • 28. GIT PRACTICES  Line-ending issue on platforms  Do not miss any file when committing in conflicted merge © 2013 KMS Technology 28 Windows Mac & Linux Problem rn n Solution git config --global core.autocrlf true git config --global core.autocrlf input
  • 29. GIT PRACTICES © 2013 KMS Technology 29  Prefer --no-ff option on merging
  • 30. © 2013 KMS Technology 30 Thank You

Editor's Notes

  1. A commit contains:changes at the time it’s createda pointer to parent commit containing unchanged thingscommit ID is a hex string for hashed content
  2. Staging Area ~ temporary storage managed by Git
  3. Go through following commands:gitinitgit add, rm, mvgit commitgit commit –amendgit log, status, diffgit reset, checkout (undo + go to commit)
  4. Branch ~ pointer to a commitHEAD ~ alias for latest commit in branch
  5. remote branch is controlled by git fetch + git pushgit clone by default creates a master remote branch
  6. Update configuration to allow pushing: $ gitconfigreceive.denyCurrentBranch ignoregit clonegit fetch (+ pull)git push
  7. speed of operation: commit, viewing history, reverting changes, etc.data loss: SVN can have corrupted revision databaseindependent and isolated: Git allows user to work without network connection and keep their work privatelylock mechanims: plays an important role when it comes to non-mergable binary files such as graphic assetsaccess control: define read/write permission on particular folder, allow to work on particular folder instead of getting entire tree
  8. Line-ending issueWindows: convert CRLF to LF when commit, and convert LF to CRLF when checkout to file systemLinux: convert CRLF to LF when commit onlyDo not miss: if you miss any file, it means changes in that files from the branch you’re merging will be discarded