SlideShare une entreprise Scribd logo
1  sur  33
Télécharger pour lire hors ligne
Distributed Source
Version Control System
   Apr 2013
Who am i

Lâm Phương Duy
Software Architect
duylam@kms-technology.com



 Use Git from 2009
 http://vn.linkedin.com/in/duylamphuong


                              Confidential   2
Objectives
  To use Git in software
   project as doing with
   SVN or TFS
  To self study Git for
   advanced needs




   Confidential             3
Syllabus

Git theory

 Daily development workflow

 Daily collaboration workflow

More on Git
              Confidential      4
Git’s history
 Source Version Control in Linux kernel project


use patches and archived files                  revoke BitKeeper, Linus Torvald
                                                started developing Git
1999                  2002

                                                                       now

                                                       2005
                       use BitKeeper (a commercal system)



                                 Confidential                                5
Syllabus

Git theory

 Daily development workflow

 Daily collaboration workflow

More on Git
              Confidential      6
Version Control Systems




Centralized Version                  Distributed Version
 Control Systems                      Control Systems



                      Confidential                         7
Git theory
 Data = Snapshot
 No network
 Three states




                       Confidential   8
Git theory
 Data = Snapshot
 No network
 Three states




                       Confidential   9
Git theory
 Data = Snapshot
 No network
 Three states


             git add
             git rm
             git status




                          Confidential   10
Syllabus

Git theory

 Daily development workflow

 Daily collaboration workflow

More on Git
              Confidential      11
Launch Git shell




      Confidential   12
Git in daily development
                                                      git log
 git init                                             git status
 git clone            git commit                      git diff

Setup repository     Change repository               Check repository




      git checkout                       git add   git checkout
      git reset                          git rm    git mv

         Undoing                           Update staging area


                          Confidential                                  13
Git remote url protocols


Local   /data/git/project.git
SSH     user@server:project.git
 Git    git://server/project.git
HTTP    http://server/project.git



               Confidential         14
Remote repository


                                         git fetch
git remote add <url>                     git pull
git clone                                git push

  Get remote repository                  Get updates




                          Confidential                 15
Authenticate with remote
          repository
1) Generate key files with ssh-keygen
2) Upload %USER_HOME%/.ssh/id_rsa.pub to
   remote repository hosting




    Read more: https://help.github.com/articles/generating-ssh-keys

                           Confidential                          16
Syllabus

Git theory

 Daily development workflow

 Daily collaboration workflow

More on Git
              Confidential      17
Branch (git branch)
1                          4



           snapshot




2                          3

                  git checkout master




            Confidential                18
Merging - Fast forward




git merge hotfix

                   Confidential   19
Merging - Non fast forward




git merge iss53

(resolve conflicts if any)



                             Confidential   20
Remote branch workflows
Create default remote branch
Get changes from remote repository
Merge changes from remote branch in
 local (two methods)
Update changes to remote repository




                 Confidential          21
Create default remote branch



                            remote branch
                           remote branch




            Time

            Confidential                    22
Get changes from remote
       repository


                        git fetch origin




         Time
         Confidential                      23
Merge changes from remote
   branch in local (v.1)


                                   origin/master   master




                         git merge origin/master




          Time
          Confidential                                      24
Merge changes from remote
   branch in local (v.2)

          git fetch
              +          git pull origin
          git merge
                           origin/master   master




          Time
          Confidential                              25
Update changes to remote
       repository
                                                                 master




                                            git.ourcompany.com

                                          git push origin/master
  origin/master   master
                                                 origin/master   master




                           Time
                           Confidential                                   26
Remote tracking branch
• Use tracking branch to let Git know which
  server and branch to push / pull
• Create remote tracking branch:
 > git checkout -b [branch] [remote name]/[branch]




                         Confidential                27
Syllabus

Git theory

 Daily development workflow

 Daily collaboration workflow

More on Git
              Confidential      28
Useful features
> git tag

> git stash

> git submodule




              Confidential   29
Common problems
> git push
! [rejected]      master -> master (non-fast forward)
Error: failed to push some refs to ‘git@gitproxy:rip747/cfwheels.git’




 > git pull
 Merge made by recursive
 > git push
 To git@gitproxy:rip747/cfwheels.git
 1717535..1406e8c master -> master




                                Confidential                            30
Common problems (cont.)
• To remove remote branch e.g origin/iss105

  > git push origin :iss105


• Use git tag to mark releases




                          Confidential        31
Reference
For everything you want to read more about Git


              http://git-scm.com




                     Confidential                32
THANK YOU

Contenu connexe

Tendances (20)

Git training v10
Git training v10Git training v10
Git training v10
 
Git n git hub
Git n git hubGit n git hub
Git n git hub
 
Git and git flow
Git and git flowGit and git flow
Git and git flow
 
Introduction git
Introduction gitIntroduction git
Introduction git
 
Git commands
Git commandsGit commands
Git commands
 
The everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitThe everyday developer's guide to version control with Git
The everyday developer's guide to version control with Git
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
git and github
git and githubgit and github
git and github
 
Git basics
Git basicsGit basics
Git basics
 
Learning git
Learning gitLearning git
Learning git
 
Versioning avec Git
Versioning avec GitVersioning avec Git
Versioning avec Git
 
Git flow Introduction
Git flow IntroductionGit flow Introduction
Git flow Introduction
 
Understanding GIT and Version Control
Understanding GIT and Version ControlUnderstanding GIT and Version Control
Understanding GIT and Version Control
 
Git & GitHub for Beginners
Git & GitHub for BeginnersGit & GitHub for Beginners
Git & GitHub for Beginners
 
Git and Github Session
Git and Github SessionGit and Github Session
Git and Github Session
 
Git - An Introduction
Git - An IntroductionGit - An Introduction
Git - An Introduction
 
Git Introduction Tutorial
Git Introduction TutorialGit Introduction Tutorial
Git Introduction Tutorial
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
 
Git and GitHub
Git and GitHubGit and GitHub
Git and GitHub
 
Git 101 for Beginners
Git 101 for Beginners Git 101 for Beginners
Git 101 for Beginners
 

Similaire à Git Version Control System

Similaire à Git Version Control System (20)

Git training
Git trainingGit training
Git training
 
Git 101 for_tarad_dev
Git 101 for_tarad_devGit 101 for_tarad_dev
Git 101 for_tarad_dev
 
Learn Git Fundamentals
Learn Git FundamentalsLearn Git Fundamentals
Learn Git Fundamentals
 
Git, GitHub and Open Source
Git, GitHub and Open SourceGit, GitHub and Open Source
Git, GitHub and Open Source
 
Git 101 Workshop
Git 101 WorkshopGit 101 Workshop
Git 101 Workshop
 
Git for uninitiated
Git for uninitiatedGit for uninitiated
Git for uninitiated
 
Git and Github
Git and GithubGit and Github
Git and Github
 
Github By Nyros Developer
Github By Nyros DeveloperGithub By Nyros Developer
Github By Nyros Developer
 
Git basic
Git basicGit basic
Git basic
 
Git
GitGit
Git
 
Introduction to Git.pptx
Introduction to Git.pptxIntroduction to Git.pptx
Introduction to Git.pptx
 
Advanced Git Tutorial
Advanced Git TutorialAdvanced Git Tutorial
Advanced Git Tutorial
 
git github PPT_GDSCIIITK.pptx
git github PPT_GDSCIIITK.pptxgit github PPT_GDSCIIITK.pptx
git github PPT_GDSCIIITK.pptx
 
Intro to Git and GitHub
Intro to Git and GitHubIntro to Git and GitHub
Intro to Git and GitHub
 
Git presentation
Git presentationGit presentation
Git presentation
 
Git from the trenches
Git from the trenchesGit from the trenches
Git from the trenches
 
Git cheat-sheets
Git cheat-sheetsGit cheat-sheets
Git cheat-sheets
 
Git, Jenkins & Chuck
Git, Jenkins & ChuckGit, Jenkins & Chuck
Git, Jenkins & Chuck
 
Git
GitGit
Git
 
Git 入门与实践
Git 入门与实践Git 入门与实践
Git 入门与实践
 

Plus de KMS Technology

A journey to a Full Stack Tester
A journey to a Full Stack Tester A journey to a Full Stack Tester
A journey to a Full Stack Tester KMS Technology
 
React & Redux, how to scale?
React & Redux, how to scale?React & Redux, how to scale?
React & Redux, how to scale?KMS Technology
 
Common design principles and design patterns in automation testing
Common design principles and design patterns in automation testingCommon design principles and design patterns in automation testing
Common design principles and design patterns in automation testingKMS Technology
 
[Webinar] Test First, Fail Fast - Simplifying the Tester's Transition to DevOps
[Webinar] Test First, Fail Fast - Simplifying the Tester's Transition to DevOps[Webinar] Test First, Fail Fast - Simplifying the Tester's Transition to DevOps
[Webinar] Test First, Fail Fast - Simplifying the Tester's Transition to DevOpsKMS Technology
 
What's new in the Front-end development nowadays?
What's new in the Front-end development nowadays?What's new in the Front-end development nowadays?
What's new in the Front-end development nowadays?KMS Technology
 
JavaScript - No Longer A Toy Language
JavaScript - No Longer A Toy LanguageJavaScript - No Longer A Toy Language
JavaScript - No Longer A Toy LanguageKMS Technology
 
JavaScript No longer A “toy” Language
JavaScript No longer A “toy” LanguageJavaScript No longer A “toy” Language
JavaScript No longer A “toy” LanguageKMS Technology
 
Preparations For A Successful Interview
Preparations For A Successful InterviewPreparations For A Successful Interview
Preparations For A Successful InterviewKMS Technology
 
Introduction To Single Page Application
Introduction To Single Page ApplicationIntroduction To Single Page Application
Introduction To Single Page ApplicationKMS Technology
 
AWS: Scaling With Elastic Beanstalk
AWS: Scaling With Elastic BeanstalkAWS: Scaling With Elastic Beanstalk
AWS: Scaling With Elastic BeanstalkKMS Technology
 
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...KMS Technology
 
Technology Application Development Trends For IT Students
Technology Application Development Trends For IT StudentsTechnology Application Development Trends For IT Students
Technology Application Development Trends For IT StudentsKMS Technology
 
Contributors for Delivering a Successful Testing Project Seminar
Contributors for Delivering a Successful Testing Project SeminarContributors for Delivering a Successful Testing Project Seminar
Contributors for Delivering a Successful Testing Project SeminarKMS Technology
 
Increase Chances to Be Hired as Software Developers - 2014
Increase Chances to Be Hired as Software Developers - 2014Increase Chances to Be Hired as Software Developers - 2014
Increase Chances to Be Hired as Software Developers - 2014KMS Technology
 
Behavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using CucumberBehavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using CucumberKMS Technology
 
Software Technology Trends in 2013-2014
Software Technology Trends in 2013-2014Software Technology Trends in 2013-2014
Software Technology Trends in 2013-2014KMS Technology
 

Plus de KMS Technology (20)

A journey to a Full Stack Tester
A journey to a Full Stack Tester A journey to a Full Stack Tester
A journey to a Full Stack Tester
 
React & Redux, how to scale?
React & Redux, how to scale?React & Redux, how to scale?
React & Redux, how to scale?
 
Sexy React Stack
Sexy React StackSexy React Stack
Sexy React Stack
 
Common design principles and design patterns in automation testing
Common design principles and design patterns in automation testingCommon design principles and design patterns in automation testing
Common design principles and design patterns in automation testing
 
[Webinar] Test First, Fail Fast - Simplifying the Tester's Transition to DevOps
[Webinar] Test First, Fail Fast - Simplifying the Tester's Transition to DevOps[Webinar] Test First, Fail Fast - Simplifying the Tester's Transition to DevOps
[Webinar] Test First, Fail Fast - Simplifying the Tester's Transition to DevOps
 
KMSNext Roadmap
KMSNext RoadmapKMSNext Roadmap
KMSNext Roadmap
 
KMS Introduction
KMS IntroductionKMS Introduction
KMS Introduction
 
What's new in the Front-end development nowadays?
What's new in the Front-end development nowadays?What's new in the Front-end development nowadays?
What's new in the Front-end development nowadays?
 
JavaScript - No Longer A Toy Language
JavaScript - No Longer A Toy LanguageJavaScript - No Longer A Toy Language
JavaScript - No Longer A Toy Language
 
JavaScript No longer A “toy” Language
JavaScript No longer A “toy” LanguageJavaScript No longer A “toy” Language
JavaScript No longer A “toy” Language
 
Preparations For A Successful Interview
Preparations For A Successful InterviewPreparations For A Successful Interview
Preparations For A Successful Interview
 
Introduction To Single Page Application
Introduction To Single Page ApplicationIntroduction To Single Page Application
Introduction To Single Page Application
 
AWS: Scaling With Elastic Beanstalk
AWS: Scaling With Elastic BeanstalkAWS: Scaling With Elastic Beanstalk
AWS: Scaling With Elastic Beanstalk
 
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
 
KMS Introduction
KMS IntroductionKMS Introduction
KMS Introduction
 
Technology Application Development Trends For IT Students
Technology Application Development Trends For IT StudentsTechnology Application Development Trends For IT Students
Technology Application Development Trends For IT Students
 
Contributors for Delivering a Successful Testing Project Seminar
Contributors for Delivering a Successful Testing Project SeminarContributors for Delivering a Successful Testing Project Seminar
Contributors for Delivering a Successful Testing Project Seminar
 
Increase Chances to Be Hired as Software Developers - 2014
Increase Chances to Be Hired as Software Developers - 2014Increase Chances to Be Hired as Software Developers - 2014
Increase Chances to Be Hired as Software Developers - 2014
 
Behavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using CucumberBehavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using Cucumber
 
Software Technology Trends in 2013-2014
Software Technology Trends in 2013-2014Software Technology Trends in 2013-2014
Software Technology Trends in 2013-2014
 

Dernier

TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 

Dernier (20)

TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 

Git Version Control System

  • 2. Who am i Lâm Phương Duy Software Architect duylam@kms-technology.com  Use Git from 2009  http://vn.linkedin.com/in/duylamphuong Confidential 2
  • 3. Objectives To use Git in software project as doing with SVN or TFS To self study Git for advanced needs Confidential 3
  • 4. Syllabus Git theory Daily development workflow Daily collaboration workflow More on Git Confidential 4
  • 5. Git’s history Source Version Control in Linux kernel project use patches and archived files revoke BitKeeper, Linus Torvald started developing Git 1999 2002 now 2005 use BitKeeper (a commercal system) Confidential 5
  • 6. Syllabus Git theory Daily development workflow Daily collaboration workflow More on Git Confidential 6
  • 7. Version Control Systems Centralized Version Distributed Version Control Systems Control Systems Confidential 7
  • 8. Git theory  Data = Snapshot  No network  Three states Confidential 8
  • 9. Git theory  Data = Snapshot  No network  Three states Confidential 9
  • 10. Git theory  Data = Snapshot  No network  Three states git add git rm git status Confidential 10
  • 11. Syllabus Git theory Daily development workflow Daily collaboration workflow More on Git Confidential 11
  • 12. Launch Git shell Confidential 12
  • 13. Git in daily development git log git init git status git clone git commit git diff Setup repository Change repository Check repository git checkout git add git checkout git reset git rm git mv Undoing Update staging area Confidential 13
  • 14. Git remote url protocols Local /data/git/project.git SSH user@server:project.git Git git://server/project.git HTTP http://server/project.git Confidential 14
  • 15. Remote repository git fetch git remote add <url> git pull git clone git push Get remote repository Get updates Confidential 15
  • 16. Authenticate with remote repository 1) Generate key files with ssh-keygen 2) Upload %USER_HOME%/.ssh/id_rsa.pub to remote repository hosting Read more: https://help.github.com/articles/generating-ssh-keys Confidential 16
  • 17. Syllabus Git theory Daily development workflow Daily collaboration workflow More on Git Confidential 17
  • 18. Branch (git branch) 1 4 snapshot 2 3 git checkout master Confidential 18
  • 19. Merging - Fast forward git merge hotfix Confidential 19
  • 20. Merging - Non fast forward git merge iss53 (resolve conflicts if any) Confidential 20
  • 21. Remote branch workflows Create default remote branch Get changes from remote repository Merge changes from remote branch in local (two methods) Update changes to remote repository Confidential 21
  • 22. Create default remote branch remote branch remote branch Time Confidential 22
  • 23. Get changes from remote repository git fetch origin Time Confidential 23
  • 24. Merge changes from remote branch in local (v.1) origin/master master git merge origin/master Time Confidential 24
  • 25. Merge changes from remote branch in local (v.2) git fetch + git pull origin git merge origin/master master Time Confidential 25
  • 26. Update changes to remote repository master git.ourcompany.com git push origin/master origin/master master origin/master master Time Confidential 26
  • 27. Remote tracking branch • Use tracking branch to let Git know which server and branch to push / pull • Create remote tracking branch: > git checkout -b [branch] [remote name]/[branch] Confidential 27
  • 28. Syllabus Git theory Daily development workflow Daily collaboration workflow More on Git Confidential 28
  • 29. Useful features > git tag > git stash > git submodule Confidential 29
  • 30. Common problems > git push ! [rejected] master -> master (non-fast forward) Error: failed to push some refs to ‘git@gitproxy:rip747/cfwheels.git’ > git pull Merge made by recursive > git push To git@gitproxy:rip747/cfwheels.git 1717535..1406e8c master -> master Confidential 30
  • 31. Common problems (cont.) • To remove remote branch e.g origin/iss105 > git push origin :iss105 • Use git tag to mark releases Confidential 31
  • 32. Reference For everything you want to read more about Git http://git-scm.com Confidential 32