SlideShare une entreprise Scribd logo
1  sur  22
Télécharger pour lire hors ligne
Git
 Zhang Chi
Git


• What

• Why

• How
What



       Google
What


                                                  git-scm.com

• Gitis a free & open source, distributed version control system
 designed to handle everything from small to very large
 projects with speed and efficiency.
What



Github.com
Why

•

•

•

•

•
Why /



•            Git

• Server
why /
        Git
WHY /




        http://nvie.com/posts/a-successful-git-branching-model/
Why /


• Git

 •              Git
Why /


•

•                commit   commit

•   commit
WHY /



• msysgit   (http://code.google.com/p/msysgit/)

• TortoiseGit   (http://code.google.com/p/tortoisegit/)
How


•

•

•
HOW /

• git   init

  •   To create a repository from an existing directory of files

• git   clone

  •   If you need to collaborate with someone on a project, or if you
      want to get a copy of a project so you can look at or use the code,
      you will clone it.
HOW /

•   git add
    •   In Git, you have to add file contents to your staging area before you can
        commit them.

•   git commit
    •   Just commit to the local repo.

•   git log
    •   show commit history of a branch
HOW /


• git   pull
  •   fetch from a remote repo and try to merge into the current branch

• git   push
  •   push your new branches and data to a remote repository
HOW /
•   git checkout

    •   switch to a new branch context

•   git branch

    •   list, create and manage working contexts

•   git merge

    •   merge a branch context into your current one

•   git tag

    •   tag a point in history as important
HOW /

• git   init ----------------------------->

• git   commit ----------------------->

• modify...

• git   commit ----------------------->

• git   push -------------------------->
HOW /

•   git branch newfeature ------------->        newfeature

•   git checkout newfeature ---------->

•   modify...

•   git commit ---------------------------->

•   git checkout master ---------------->        master

•   git merge newfeature -------------->       newfeature    master
who




      using Github.com
Ref


• Git   Reference (http://gitref.org/)

•A successful Git branching model (http://nvie.com/posts/a-
 successful-git-branching-model/)


• Why    Git is Better than X (http://whygitisbetterthanx.com/)
Thanks!

Contenu connexe

Tendances

Git locally git rm/revert/reset
Git locally git rm/revert/resetGit locally git rm/revert/reset
Git locally git rm/revert/resetahmadezzeir
 
Fundamentals of Git
Fundamentals of GitFundamentals of Git
Fundamentals of Gitcmckni3
 
Getting Started with Git and GitHub
Getting Started with Git and GitHubGetting Started with Git and GitHub
Getting Started with Git and GitHubRabiraj Khadka
 
Introducing GitLab (September 2018)
Introducing GitLab (September 2018)Introducing GitLab (September 2018)
Introducing GitLab (September 2018)Noa Harel
 
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overviewGit and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overviewRueful Robin
 
Git and git workflow best practice
Git and git workflow best practiceGit and git workflow best practice
Git and git workflow best practiceMajid Hosseini
 
Git and github fundamentals
Git and github fundamentalsGit and github fundamentals
Git and github fundamentalsRajKharvar
 
Git tutorial git branches 20131206-Bryan
Git tutorial   git branches 20131206-BryanGit tutorial   git branches 20131206-Bryan
Git tutorial git branches 20131206-BryanLearningTech
 
Introduction to Git and GitHub Part 1
Introduction to Git and GitHub Part 1Introduction to Git and GitHub Part 1
Introduction to Git and GitHub Part 1Omar Fathy
 
Git for Beginners
Git for BeginnersGit for Beginners
Git for BeginnersRick Umali
 
Introduction to Git and GitHub Part 2
Introduction to Git and GitHub Part 2Introduction to Git and GitHub Part 2
Introduction to Git and GitHub Part 2Omar Fathy
 

Tendances (20)

Git locally git rm/revert/reset
Git locally git rm/revert/resetGit locally git rm/revert/reset
Git locally git rm/revert/reset
 
Git kelvin
Git   kelvinGit   kelvin
Git kelvin
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Fundamentals of Git
Fundamentals of GitFundamentals of Git
Fundamentals of Git
 
Getting Started with Git and GitHub
Getting Started with Git and GitHubGetting Started with Git and GitHub
Getting Started with Git and GitHub
 
Introducing GitLab (September 2018)
Introducing GitLab (September 2018)Introducing GitLab (September 2018)
Introducing GitLab (September 2018)
 
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overviewGit and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
 
Flow
FlowFlow
Flow
 
Git basics
Git basicsGit basics
Git basics
 
Git & Github
Git & GithubGit & Github
Git & Github
 
Intro to Git & GitHub
Intro to Git & GitHubIntro to Git & GitHub
Intro to Git & GitHub
 
Git Tutorial
Git TutorialGit Tutorial
Git Tutorial
 
Git and git workflow best practice
Git and git workflow best practiceGit and git workflow best practice
Git and git workflow best practice
 
Git and github fundamentals
Git and github fundamentalsGit and github fundamentals
Git and github fundamentals
 
沒有 GUI 的 Git
沒有 GUI 的 Git沒有 GUI 的 Git
沒有 GUI 的 Git
 
Git tutorial git branches 20131206-Bryan
Git tutorial   git branches 20131206-BryanGit tutorial   git branches 20131206-Bryan
Git tutorial git branches 20131206-Bryan
 
Introduction to Git and GitHub Part 1
Introduction to Git and GitHub Part 1Introduction to Git and GitHub Part 1
Introduction to Git and GitHub Part 1
 
Git for Beginners
Git for BeginnersGit for Beginners
Git for Beginners
 
Introduction to Git and GitHub Part 2
Introduction to Git and GitHub Part 2Introduction to Git and GitHub Part 2
Introduction to Git and GitHub Part 2
 
Gitmar
GitmarGitmar
Gitmar
 

Similaire à Git简介

Learn Git - For Beginners and Intermediate levels
Learn Git - For Beginners and Intermediate levelsLearn Git - For Beginners and Intermediate levels
Learn Git - For Beginners and Intermediate levelsGorav Singal
 
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 GitHubBigBlueHat
 
Git installation and configuration
Git installation and configurationGit installation and configuration
Git installation and configurationKishor Kumar
 
Git One Day Training Notes
Git One Day Training NotesGit One Day Training Notes
Git One Day Training Notesglen_a_smith
 
Git Tutorial I
Git Tutorial IGit Tutorial I
Git Tutorial IJim Yeh
 
COSCUP 開源工作坊:Git workflows
COSCUP 開源工作坊:Git workflowsCOSCUP 開源工作坊:Git workflows
COSCUP 開源工作坊:Git workflowsCarl Su
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to GitColin Su
 
11 git version control
11 git version control11 git version control
11 git version controlWasim Alatrash
 
Git isthenewsexy
Git isthenewsexyGit isthenewsexy
Git isthenewsexyAilsa126
 
Git Ninja KT (GitHub to GitLab)
Git Ninja KT (GitHub to GitLab)Git Ninja KT (GitHub to GitLab)
Git Ninja KT (GitHub to GitLab)Ashok Kumar
 
Git Introductive
Git IntroductiveGit Introductive
Git IntroductiveAdham Saad
 
Introduction to Git, DrupalCamp LA 2015
Introduction to Git, DrupalCamp LA 2015Introduction to Git, DrupalCamp LA 2015
Introduction to Git, DrupalCamp LA 2015mwrather
 
Git tutorial II
Git tutorial IIGit tutorial II
Git tutorial IIJim Yeh
 
An introduction to Git
An introduction to GitAn introduction to Git
An introduction to GitMuhil Vannan
 
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 GitHubKim Moir
 

Similaire à Git简介 (20)

Learn Git - For Beginners and Intermediate levels
Learn Git - For Beginners and Intermediate levelsLearn Git - For Beginners and Intermediate levels
Learn Git - For Beginners and Intermediate levels
 
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
 
Git installation and configuration
Git installation and configurationGit installation and configuration
Git installation and configuration
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
 
Git One Day Training Notes
Git One Day Training NotesGit One Day Training Notes
Git One Day Training Notes
 
Git tips and tricks
Git   tips and tricksGit   tips and tricks
Git tips and tricks
 
Git Tutorial I
Git Tutorial IGit Tutorial I
Git Tutorial I
 
Git'in on Windows
Git'in on WindowsGit'in on Windows
Git'in on Windows
 
COSCUP 開源工作坊:Git workflows
COSCUP 開源工作坊:Git workflowsCOSCUP 開源工作坊:Git workflows
COSCUP 開源工作坊:Git workflows
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
11 git version control
11 git version control11 git version control
11 git version control
 
Git
GitGit
Git
 
Git isthenewsexy
Git isthenewsexyGit isthenewsexy
Git isthenewsexy
 
Git Ninja KT (GitHub to GitLab)
Git Ninja KT (GitHub to GitLab)Git Ninja KT (GitHub to GitLab)
Git Ninja KT (GitHub to GitLab)
 
Git Introductive
Git IntroductiveGit Introductive
Git Introductive
 
Introduction to Git, DrupalCamp LA 2015
Introduction to Git, DrupalCamp LA 2015Introduction to Git, DrupalCamp LA 2015
Introduction to Git, DrupalCamp LA 2015
 
Git tutorial II
Git tutorial IIGit tutorial II
Git tutorial II
 
Git 101 for_tarad_dev
Git 101 for_tarad_devGit 101 for_tarad_dev
Git 101 for_tarad_dev
 
An introduction to Git
An introduction to GitAn introduction to Git
An introduction to Git
 
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简介

  • 3. What Google
  • 4. What git-scm.com • Gitis a free & open source, distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
  • 7. Why / • Git • Server
  • 8. why / Git
  • 9. WHY / http://nvie.com/posts/a-successful-git-branching-model/
  • 10. Why / • Git • Git
  • 11. Why / • • commit commit • commit
  • 12. WHY / • msysgit (http://code.google.com/p/msysgit/) • TortoiseGit (http://code.google.com/p/tortoisegit/)
  • 14. HOW / • git init • To create a repository from an existing directory of files • git clone • If you need to collaborate with someone on a project, or if you want to get a copy of a project so you can look at or use the code, you will clone it.
  • 15. HOW / • git add • In Git, you have to add file contents to your staging area before you can commit them. • git commit • Just commit to the local repo. • git log • show commit history of a branch
  • 16. HOW / • git pull • fetch from a remote repo and try to merge into the current branch • git push • push your new branches and data to a remote repository
  • 17. HOW / • git checkout • switch to a new branch context • git branch • list, create and manage working contexts • git merge • merge a branch context into your current one • git tag • tag a point in history as important
  • 18. HOW / • git init -----------------------------> • git commit -----------------------> • modify... • git commit -----------------------> • git push -------------------------->
  • 19. HOW / • git branch newfeature -------------> newfeature • git checkout newfeature ----------> • modify... • git commit ----------------------------> • git checkout master ----------------> master • git merge newfeature --------------> newfeature master
  • 20. who using Github.com
  • 21. Ref • Git Reference (http://gitref.org/) •A successful Git branching model (http://nvie.com/posts/a- successful-git-branching-model/) • Why Git is Better than X (http://whygitisbetterthanx.com/)