SlideShare a Scribd company logo
1 of 18
Download to read offline
Beginning git
                              @ghosTM55




Sunday, November 20, 11
Outline

                          What is git?

                          How do we use git?

                          Basic commands

                          Collaboration on a powerful platform




Sunday, November 20, 11
Version Control System

                          rcs

                          subversion

                           git

Sunday, November 20, 11
Killing features

                          Fully distributed
                            Fast

                            Local

                            Secure


                          Strong support for non-linear development

                          Snapshots, not differences



Sunday, November 20, 11
When to use git?



                          Work on a project together
                          Backup small files




Sunday, November 20, 11
Get a git repo



                          git init
                          git clone




Sunday, November 20, 11
Basic commands

                          git status

                          git diff

                          git commit

                          git push

                          git pull



Sunday, November 20, 11
.gitignore


                          *.bak

                          !emacs.bak

                          lib/

                          build/*.o




Sunday, November 20, 11
File changes



                          git mv

                          git rm




Sunday, November 20, 11
View commit history

                          git log

                          git log -p -2

                          git log --pretty=oneline --graph

                          git log --pretty=format:”%format”

                          git log --since=2.weeks



Sunday, November 20, 11
Undoing things



                          git commit --amend

                          git reset




Sunday, November 20, 11
Branch

                          git branch

                          git branch branch_name

                          git checkout branch_name

                          git merge branch_name

                          git branch -d branch_name



Sunday, November 20, 11
Teamwork time


                          git clone

                          git remote add remote_name remote_address

                          git pull remote_name

                          git push remote_name branch_name




Sunday, November 20, 11
github


                          Most popular project hosting service

                          Lots of great projects and developers

                          It inspires developers to do better




Sunday, November 20, 11
In China?




                            0
Sunday, November 20, 11
Here we go




Sunday, November 20, 11
Why?
                          Promote Chinese opensource projects

                          Promote Chinese opensource communities

                          Easier for newbies take part in projects

                          Easier for enterprises to hire developers

                          Easier for all of you get tech info

                          Why NOT?


Sunday, November 20, 11
We’re still young

                          Let’s work harder for tomorrow




                                  THX :)
Sunday, November 20, 11

More Related Content

Similar to Beginning git

Similar to Beginning git (20)

Working with Git
Working with GitWorking with Git
Working with Git
 
Git tech talk
Git tech talkGit tech talk
Git tech talk
 
Git Tech Talk
Git  Tech TalkGit  Tech Talk
Git Tech Talk
 
Wokshop de Git
Wokshop de Git Wokshop de Git
Wokshop de Git
 
Git cheat-sheets
Git cheat-sheetsGit cheat-sheets
Git cheat-sheets
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
 
Improving your workflow with git
Improving your workflow with gitImproving your workflow with git
Improving your workflow with git
 
Git
GitGit
Git
 
Git the Wnderfull tool
Git the Wnderfull toolGit the Wnderfull tool
Git the Wnderfull tool
 
Git 零基础介绍
Git 零基础介绍Git 零基础介绍
Git 零基础介绍
 
Get going with_git_ppt
Get going with_git_pptGet going with_git_ppt
Get going with_git_ppt
 
Thinking in Git
Thinking in GitThinking in Git
Thinking in Git
 
Git! Why? How?
Git! Why? How?Git! Why? How?
Git! Why? How?
 
T3dd10 git
T3dd10 gitT3dd10 git
T3dd10 git
 
Git Version Control System
Git Version Control SystemGit Version Control System
Git Version Control System
 
Git training
Git trainingGit training
Git training
 
How Git and Gerrit make you more productive
How Git and Gerrit make you more productiveHow Git and Gerrit make you more productive
How Git and Gerrit make you more productive
 
The Fundamentals of Git
The Fundamentals of GitThe Fundamentals of Git
The Fundamentals of Git
 
Github flow
Github flowGithub flow
Github flow
 
Git and Github workshop
Git and Github workshopGit and Github workshop
Git and Github workshop
 

More from Rhythm Sun

长连接服务 WebSocket Service
长连接服务 WebSocket Service长连接服务 WebSocket Service
长连接服务 WebSocket ServiceRhythm Sun
 
Trello workflow by @imRhythm
Trello workflow by @imRhythmTrello workflow by @imRhythm
Trello workflow by @imRhythmRhythm Sun
 
Bitcoin and retail
Bitcoin and retailBitcoin and retail
Bitcoin and retailRhythm Sun
 
Garage cafe keynote peak ji_no_video
Garage cafe keynote peak ji_no_videoGarage cafe keynote peak ji_no_video
Garage cafe keynote peak ji_no_videoRhythm Sun
 
Doc 2011101412020074
Doc 2011101412020074Doc 2011101412020074
Doc 2011101412020074Rhythm Sun
 
Doc 2011101411284862
Doc 2011101411284862Doc 2011101411284862
Doc 2011101411284862Rhythm Sun
 
Doc 2011101410543721
Doc 2011101410543721Doc 2011101410543721
Doc 2011101410543721Rhythm Sun
 
Doc 2011101404575913
Doc 2011101404575913Doc 2011101404575913
Doc 2011101404575913Rhythm Sun
 
Doc 2010050608572429
Doc 2010050608572429Doc 2010050608572429
Doc 2010050608572429Rhythm Sun
 
火狐2011 sfd讲稿
火狐2011 sfd讲稿火狐2011 sfd讲稿
火狐2011 sfd讲稿Rhythm Sun
 
Sunpinyin and it's future
Sunpinyin and it's futureSunpinyin and it's future
Sunpinyin and it's futureRhythm Sun
 
Customize snipmate
Customize snipmateCustomize snipmate
Customize snipmateRhythm Sun
 
Adorable python
Adorable pythonAdorable python
Adorable pythonRhythm Sun
 
First meetingwithgit
First meetingwithgitFirst meetingwithgit
First meetingwithgitRhythm Sun
 

More from Rhythm Sun (18)

长连接服务 WebSocket Service
长连接服务 WebSocket Service长连接服务 WebSocket Service
长连接服务 WebSocket Service
 
Trello workflow by @imRhythm
Trello workflow by @imRhythmTrello workflow by @imRhythm
Trello workflow by @imRhythm
 
Bitcoin and retail
Bitcoin and retailBitcoin and retail
Bitcoin and retail
 
Garage cafe keynote peak ji_no_video
Garage cafe keynote peak ji_no_videoGarage cafe keynote peak ji_no_video
Garage cafe keynote peak ji_no_video
 
Doc 2011101412020074
Doc 2011101412020074Doc 2011101412020074
Doc 2011101412020074
 
Doc 2011101411284862
Doc 2011101411284862Doc 2011101411284862
Doc 2011101411284862
 
Doc 2011101410543721
Doc 2011101410543721Doc 2011101410543721
Doc 2011101410543721
 
Doc 2011101404575913
Doc 2011101404575913Doc 2011101404575913
Doc 2011101404575913
 
Doc 2010050608572429
Doc 2010050608572429Doc 2010050608572429
Doc 2010050608572429
 
Outside
OutsideOutside
Outside
 
火狐2011 sfd讲稿
火狐2011 sfd讲稿火狐2011 sfd讲稿
火狐2011 sfd讲稿
 
Linuxdeepin
LinuxdeepinLinuxdeepin
Linuxdeepin
 
Sunpinyin and it's future
Sunpinyin and it's futureSunpinyin and it's future
Sunpinyin and it's future
 
Customize snipmate
Customize snipmateCustomize snipmate
Customize snipmate
 
Adorable python
Adorable pythonAdorable python
Adorable python
 
Zsh
ZshZsh
Zsh
 
Using vim
Using vimUsing vim
Using vim
 
First meetingwithgit
First meetingwithgitFirst meetingwithgit
First meetingwithgit
 

Recently uploaded

Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data SciencePaolo Missier
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxMarkSteadman7
 
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 InsightSafe Software
 
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 EnterpriseWSO2
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
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...WSO2
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformWSO2
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
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 businesspanagenda
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
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 GuidePixlogix Infotech
 
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 Pakistandanishmna97
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
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 FMESafe Software
 
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...caitlingebhard1
 
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 Ontologyjohnbeverley2021
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceIES VE
 
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 governanceWSO2
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 

Recently uploaded (20)

Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptx
 
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
 
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
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
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...
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
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
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
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
 
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
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
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
 
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
 
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
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational Performance
 
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
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 

Beginning git

  • 1. Beginning git @ghosTM55 Sunday, November 20, 11
  • 2. Outline What is git? How do we use git? Basic commands Collaboration on a powerful platform Sunday, November 20, 11
  • 3. Version Control System rcs subversion git Sunday, November 20, 11
  • 4. Killing features Fully distributed Fast Local Secure Strong support for non-linear development Snapshots, not differences Sunday, November 20, 11
  • 5. When to use git? Work on a project together Backup small files Sunday, November 20, 11
  • 6. Get a git repo git init git clone Sunday, November 20, 11
  • 7. Basic commands git status git diff git commit git push git pull Sunday, November 20, 11
  • 8. .gitignore *.bak !emacs.bak lib/ build/*.o Sunday, November 20, 11
  • 9. File changes git mv git rm Sunday, November 20, 11
  • 10. View commit history git log git log -p -2 git log --pretty=oneline --graph git log --pretty=format:”%format” git log --since=2.weeks Sunday, November 20, 11
  • 11. Undoing things git commit --amend git reset Sunday, November 20, 11
  • 12. Branch git branch git branch branch_name git checkout branch_name git merge branch_name git branch -d branch_name Sunday, November 20, 11
  • 13. Teamwork time git clone git remote add remote_name remote_address git pull remote_name git push remote_name branch_name Sunday, November 20, 11
  • 14. github Most popular project hosting service Lots of great projects and developers It inspires developers to do better Sunday, November 20, 11
  • 15. In China? 0 Sunday, November 20, 11
  • 16. Here we go Sunday, November 20, 11
  • 17. Why? Promote Chinese opensource projects Promote Chinese opensource communities Easier for newbies take part in projects Easier for enterprises to hire developers Easier for all of you get tech info Why NOT? Sunday, November 20, 11
  • 18. We’re still young Let’s work harder for tomorrow THX :) Sunday, November 20, 11