SlideShare une entreprise Scribd logo
1  sur  32
Télécharger pour lire hors ligne
Introduction to Git
    Version Control System
Who am I
•   LittleQ, junior student@ NCCUCS
•   Software engineer @ Genie Capital
•   Co-organizer @ Taipei Google Tech User Group
•   Instructor @ Geego system, Inc
•   http://about.me/littleq
•   Python, Linux and everything geeky!
                                          Git Introduction
                                          Version Control System
What is Git

•   Version control system
•   Coding history
•   Distributed version control



                                  Git Introduction
                                  Version Control System
Version
     False                                    True

                    commit	
  296fad37b4e3e78bd952d419625d87f52a3d52d4

    Diablo I
                    Merge:	
  e5fb1da	
  fe68f70
                    Author:	
  Jacob	
  Thornton	
  <jacobthornton@gmail.com>
                    Date:	
  	
  	
  Thu	
  Nov	
  24	
  11:13:33	
  2011	
  -­‐0800
   Diablo II        	
  	
  	
  	
  新增⼀一行很重要的code,把bug給修好了!
Diablo III (5/15)   commit	
  fe68f708ce723cef640c1cf784cb29da513bca22

   Starcraft I      Author:	
  Martin	
  Bean	
  <martin@mcbwebdesign.co.uk>
                    Date:	
  	
  	
  Thu	
  Nov	
  24	
  19:06:00	
  2011	
  +0000

  Starcraft II      	
  	
  	
  	
  樓上對不起!我不小心把你code給砍了=	
  =




                                                      Git Introduction
                                                      Version Control System
Why Git

•   Maintenance
•   Debug
•   Responsibility



                         Git Introduction
                         Version Control System
History


•   Developed by Linus Torvalds
•   Born for improving the development of
    Linux Kernel



                                    Git Introduction
                                    Version Control System
Who need Git

•   Real Engineer
•   Engineers who is working with thousands
    of thousands of lines of code
•   Wanna being a contributor of open source
    projects


                                     Git Introduction
                                     Version Control System
Requirement




              Git Introduction
              Version Control System
Scenario


•   Team work
•   Code management




                       Git Introduction
                       Version Control System
Terminology

•   commit
•   stage
•   repository



                          Git Introduction
                          Version Control System
Commit
commit bf74427f03bc80927f97755772d87e579604cf35




         commit 72da1eb5da5596432b0b36534169756f44bae70f




                       commit a9718b877b45f987502357204fdbe0ec7599b46c




                                                            Git Introduction
                                                            Version Control System
Commit
commit inside:
  diff	
  -­‐-­‐git	
  a/omgtt/configs/staging/settings.py	
  b/omgtt/configs/
  staging/settings.py
  index	
  a17ad10..932c66a	
  100644
  -­‐-­‐-­‐	
  a/omgtt/configs/staging/settings.py
  +++	
  b/omgtt/configs/staging/settings.py
  @@	
  -­‐10,7	
  +10,7	
  @@	
  ADMIN_MEDIA_PREFIX	
  =	
  '/static/admin/'
  	
  DOWNLOAD_DIRECTORY	
  =	
  '/tmp/'
  	
  
  	
  SITE_DOMAIN	
  =	
  'omg.demo.gd:3377'
  +SITE_ID	
  =	
  '4ef4509316d5ad652a00001c'
  -­‐SITE_ID	
  =	
  ''
  	
  
  	
  
  	
  INTERNAL_IPS	
  =	
  ()


                                                                     Git Introduction
                                                                     Version Control System
Let’s rock!


              Git Introduction
              Version Control System
Steps

•   Install Git
•   Setup Git
•   Initialize your first local repository
•   Commit, commit and commit!


                                             Git Introduction
                                             Version Control System
Install Git


•   In Linux, it is just a piece of cake
•   In Windows, google it




                                           Git Introduction
                                           Version Control System
Using Git on ghost

•   For using the latest version of git:
    `export	
  PATH=”/opt/csw/bin:$PATH”`
•   Write it down in your ~/.profile
•   And login again


                                        Git Introduction
                                        Version Control System
Setup Git

•   Username
    git config --global user.name “LittleQ”
•   Email
    git config --global user.email “your email”


                                        Git Introduction
                                        Version Control System
Repo init

•   Get into your project’s root directory
•   `git init`
•   `git add .`
•   `git commit -m “first commit”`


                                        Git Introduction
                                        Version Control System
Commit

•   the basic unit of modified records
•   changes can be on single file or multiple
    files
•   can be deleting files or adding files


                                            Git Introduction
                                            Version Control System
Make a commit

•   Make the modifications
•   `git status`
•   `git add <modified-files>`
•   `git commit -m “message”`


                                 Git Introduction
                                 Version Control System
Push & Pull

•   Push: send your modifications to the
    server
•   Pull: receive the modifications from others
•   `git pull`
•   `git push origin master`

                                       Git Introduction
                                       Version Control System
Clone a Repo


•   git clone <git-repo-url>




                               Git Introduction
                               Version Control System
Github

•   A social website of engineers
    (Engineering version Facebook)
•   Easy to manage your git repo
•   Socialize your work


                                     Git Introduction
                                     Version Control System
Exercise

•   Here we are going to create a repo and
    build a simple Hello World program on it
•   We won’t do much programming stuff, so
    please concentrate
•   Now pick up 3 members (Included
    yourself ) to form a group

    goo.gl/C2vFG                      Git Introduction
                                      Version Control System
Sign Up

•   Just go to sign up an account on Github
•   Find out the profile page of your
    teammates and follow them on github
•   Choose one as the leader and the one
    need to create a repo and add others
    members as the repo members

                                      Git Introduction
                                      Version Control System
Create a Repo and
      Push to Server
•   mkdir teamXX; cd teamXX;
•   git init
•   git remote add origin <url-of-repo>
•   git add .
•   git commit -m “first commit”
•   git push origin master
                                      Git Introduction
                                      Version Control System
Prototype of HW
        cp	
  /usr/local/class/mathcp/materials/git	
  ~/TeamXX

#	
  comments
#	
  teamXX
#	
  99XXXXXX,	
  99XXXXXX,	
  99XXXXXX

function	
  hello1()	
  {
  print(“hello,	
  member1’s	
  name”);
}

function	
  hello2()	
  {
  print(“hello,	
  member2’s	
  name”);
}

function	
  hello3()	
  {
	
  	
  print(“hello,	
  member2’s	
  name”);
}

function	
  main()	
  {
	
  	
  hello1();
	
  	
  hello2();
	
  	
  hello3();
}                                                      Git Introduction
                                                       Version Control System
Notice

•   Each function can only be completed by
    one and different from others
•   Need to push onto github
•   If someone got stuck, help each other


                                      Git Introduction
                                      Version Control System
And More...

•   Branch
•   Merge
•   Remote



                           Git Introduction
                           Version Control System
Repository Hosting

•   Google Code (free)
•   Github (free)
•   Bitbucket (free, private repo)
•   unfuddle
•   repositoryhosting

                                     Git Introduction
                                     Version Control System
Resource

•   Git
    http://git-scm.com/
•   Github help
    http://help.github.com/
•   iHower blog
    http://ihower.tw/blog/posts > Git category

                                      Git Introduction
                                      Version Control System
The End


          Git Introduction
          Version Control System

Contenu connexe

Tendances

Starting with Git & GitHub
Starting with Git & GitHubStarting with Git & GitHub
Starting with Git & GitHubNicolás Tourné
 
Learning git
Learning gitLearning git
Learning gitSid Anand
 
Understanding GIT and Version Control
Understanding GIT and Version ControlUnderstanding GIT and Version Control
Understanding GIT and Version ControlSourabh Sahu
 
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
 
Github - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsGithub - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsLee Hanxue
 
Git Terminologies
Git TerminologiesGit Terminologies
Git TerminologiesYash
 
Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners HubSpot
 
Introduction to git and github
Introduction to git and githubIntroduction to git and github
Introduction to git and githubAderemi Dadepo
 
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...Simplilearn
 
Introduction to github slideshare
Introduction to github slideshareIntroduction to github slideshare
Introduction to github slideshareRakesh Sukumar
 
Git and git workflow best practice
Git and git workflow best practiceGit and git workflow best practice
Git and git workflow best practiceMajid Hosseini
 

Tendances (20)

Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Git training v10
Git training v10Git training v10
Git training v10
 
Git & GitHub WorkShop
Git & GitHub WorkShopGit & GitHub WorkShop
Git & GitHub WorkShop
 
Git basics
Git basicsGit basics
Git basics
 
Starting with Git & GitHub
Starting with Git & GitHubStarting with Git & GitHub
Starting with Git & GitHub
 
Introduction To Git
Introduction To GitIntroduction To Git
Introduction To Git
 
Learning git
Learning gitLearning git
Learning git
 
GitHub Basics - Derek Bable
GitHub Basics - Derek BableGitHub Basics - Derek Bable
GitHub Basics - Derek Bable
 
Understanding GIT and Version Control
Understanding GIT and Version ControlUnderstanding GIT and Version Control
Understanding GIT and Version Control
 
Git basic
Git basicGit basic
Git basic
 
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
 
Github - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsGithub - Git Training Slides: Foundations
Github - Git Training Slides: Foundations
 
Git Terminologies
Git TerminologiesGit Terminologies
Git Terminologies
 
Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners
 
Git and GitHub
Git and GitHubGit and GitHub
Git and GitHub
 
Introduction to git and github
Introduction to git and githubIntroduction to git and github
Introduction to git and github
 
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
 
Introduction to github slideshare
Introduction to github slideshareIntroduction to github slideshare
Introduction to github slideshare
 
Git and git workflow best practice
Git and git workflow best practiceGit and git workflow best practice
Git and git workflow best practice
 
Git n git hub
Git n git hubGit n git hub
Git n git hub
 

En vedette

CraftCamp for Students - Introduction to git
CraftCamp for Students - Introduction to gitCraftCamp for Students - Introduction to git
CraftCamp for Students - Introduction to gitcraftworkz
 
Git - The Incomplete Introduction
Git - The Incomplete IntroductionGit - The Incomplete Introduction
Git - The Incomplete Introductionrschwietzke
 
An introduction to git
An introduction to gitAn introduction to git
An introduction to gitolberger
 
Securing the Socks Shop
Securing the Socks ShopSecuring the Socks Shop
Securing the Socks ShopJason Smith
 
Harvard ABCD-WWW Git presentation
Harvard ABCD-WWW Git presentationHarvard ABCD-WWW Git presentation
Harvard ABCD-WWW Git presentationJeff Byrnes
 
Git Introduction
Git IntroductionGit Introduction
Git IntroductionGareth Hall
 

En vedette (11)

Git in 10 minutes
Git in 10 minutesGit in 10 minutes
Git in 10 minutes
 
CraftCamp for Students - Introduction to git
CraftCamp for Students - Introduction to gitCraftCamp for Students - Introduction to git
CraftCamp for Students - Introduction to git
 
Git techtalk
Git techtalkGit techtalk
Git techtalk
 
Git for the win!
Git for the win!Git for the win!
Git for the win!
 
Git - The Incomplete Introduction
Git - The Incomplete IntroductionGit - The Incomplete Introduction
Git - The Incomplete Introduction
 
An introduction to git
An introduction to gitAn introduction to git
An introduction to git
 
Securing the Socks Shop
Securing the Socks ShopSecuring the Socks Shop
Securing the Socks Shop
 
Git Hogent
Git HogentGit Hogent
Git Hogent
 
Git 101
Git 101Git 101
Git 101
 
Harvard ABCD-WWW Git presentation
Harvard ABCD-WWW Git presentationHarvard ABCD-WWW Git presentation
Harvard ABCD-WWW Git presentation
 
Git Introduction
Git IntroductionGit Introduction
Git Introduction
 

Similaire à Introduction to Git

Git installation and configuration
Git installation and configurationGit installation and configuration
Git installation and configurationKishor Kumar
 
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
 
Introduction to Git.pptx
Introduction to Git.pptxIntroduction to Git.pptx
Introduction to Git.pptxgdscuds
 
git and github-1.pptx
git and github-1.pptxgit and github-1.pptx
git and github-1.pptxtnscharishma
 
Git Tutorial I
Git Tutorial IGit Tutorial I
Git Tutorial IJim Yeh
 
Git, GitHub and Open Source
Git, GitHub and Open SourceGit, GitHub and Open Source
Git, GitHub and Open SourceLorna Mitchell
 
Git extension-training
Git extension-trainingGit extension-training
Git extension-trainingEric Guo
 
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
 
Intro to Git, GitHub, and Devpost
Intro to Git, GitHub, and DevpostIntro to Git, GitHub, and Devpost
Intro to Git, GitHub, and DevpostAndrew Kerr
 
Git简介
Git简介Git简介
Git简介clvrobj
 
Version control git day02
Version control   git day02Version control   git day02
Version control git day02Gourav Varma
 

Similaire à Introduction to Git (20)

Git installation and configuration
Git installation and configurationGit installation and configuration
Git installation and configuration
 
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
 
Introduction to Git.pptx
Introduction to Git.pptxIntroduction to Git.pptx
Introduction to Git.pptx
 
git and github-1.pptx
git and github-1.pptxgit and github-1.pptx
git and github-1.pptx
 
Git Tutorial I
Git Tutorial IGit Tutorial I
Git Tutorial I
 
Github
GithubGithub
Github
 
Git-r-Done
Git-r-DoneGit-r-Done
Git-r-Done
 
Git, GitHub and Open Source
Git, GitHub and Open SourceGit, GitHub and Open Source
Git, GitHub and Open Source
 
Demo
DemoDemo
Demo
 
Git extension-training
Git extension-trainingGit extension-training
Git extension-training
 
Git Basics
Git BasicsGit Basics
Git Basics
 
Git
GitGit
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 levels
 
Intro to Git, GitHub, and Devpost
Intro to Git, GitHub, and DevpostIntro to Git, GitHub, and Devpost
Intro to Git, GitHub, and Devpost
 
Git简介
Git简介Git简介
Git简介
 
Github basics
Github basicsGithub basics
Github basics
 
Git 101 for_tarad_dev
Git 101 for_tarad_devGit 101 for_tarad_dev
Git 101 for_tarad_dev
 
Git'in on Windows
Git'in on WindowsGit'in on Windows
Git'in on Windows
 
git KT .pptx
git KT .pptxgit KT .pptx
git KT .pptx
 
Version control git day02
Version control   git day02Version control   git day02
Version control git day02
 

Plus de Colin Su

Introduction to Google Compute Engine
Introduction to Google Compute EngineIntroduction to Google Compute Engine
Introduction to Google Compute EngineColin Su
 
Introduction to Google Cloud Endpoints: Speed Up Your API Development
Introduction to Google Cloud Endpoints: Speed Up Your API DevelopmentIntroduction to Google Cloud Endpoints: Speed Up Your API Development
Introduction to Google Cloud Endpoints: Speed Up Your API DevelopmentColin Su
 
Functional programming in Python
Functional programming in PythonFunctional programming in Python
Functional programming in PythonColin Su
 
Web2py Code Lab
Web2py Code LabWeb2py Code Lab
Web2py Code LabColin Su
 
A Tour of Google Cloud Platform
A Tour of Google Cloud PlatformA Tour of Google Cloud Platform
A Tour of Google Cloud PlatformColin Su
 
Introduction to Facebook JavaScript & Python SDK
Introduction to Facebook JavaScript & Python SDKIntroduction to Facebook JavaScript & Python SDK
Introduction to Facebook JavaScript & Python SDKColin Su
 
Introduction to MapReduce & hadoop
Introduction to MapReduce & hadoopIntroduction to MapReduce & hadoop
Introduction to MapReduce & hadoopColin Su
 
Introduction to Google App Engine
Introduction to Google App EngineIntroduction to Google App Engine
Introduction to Google App EngineColin Su
 
Django Deployer
Django DeployerDjango Deployer
Django DeployerColin Su
 
Introduction to Google - the most natural way to learn English (English Speech)
Introduction to Google - the most natural way to learn English (English Speech)Introduction to Google - the most natural way to learn English (English Speech)
Introduction to Google - the most natural way to learn English (English Speech)Colin Su
 
How to Speak Charms Like a Wizard
How to Speak Charms Like a WizardHow to Speak Charms Like a Wizard
How to Speak Charms Like a WizardColin Su
 
房地產報告
房地產報告房地產報告
房地產報告Colin Su
 
Introduction to Facebook Javascript SDK (NEW)
Introduction to Facebook Javascript SDK (NEW)Introduction to Facebook Javascript SDK (NEW)
Introduction to Facebook Javascript SDK (NEW)Colin Su
 
Introduction to Facebook Python API
Introduction to Facebook Python APIIntroduction to Facebook Python API
Introduction to Facebook Python APIColin Su
 
Facebook Python SDK - Introduction
Facebook Python SDK - IntroductionFacebook Python SDK - Introduction
Facebook Python SDK - IntroductionColin Su
 
Web Programming - 1st TA Session
Web Programming - 1st TA SessionWeb Programming - 1st TA Session
Web Programming - 1st TA SessionColin Su
 
Nested List Comprehension and Binary Search
Nested List Comprehension and Binary SearchNested List Comprehension and Binary Search
Nested List Comprehension and Binary SearchColin Su
 
Python-List comprehension
Python-List comprehensionPython-List comprehension
Python-List comprehensionColin Su
 
Python-FileIO
Python-FileIOPython-FileIO
Python-FileIOColin Su
 
Python Dictionary
Python DictionaryPython Dictionary
Python DictionaryColin Su
 

Plus de Colin Su (20)

Introduction to Google Compute Engine
Introduction to Google Compute EngineIntroduction to Google Compute Engine
Introduction to Google Compute Engine
 
Introduction to Google Cloud Endpoints: Speed Up Your API Development
Introduction to Google Cloud Endpoints: Speed Up Your API DevelopmentIntroduction to Google Cloud Endpoints: Speed Up Your API Development
Introduction to Google Cloud Endpoints: Speed Up Your API Development
 
Functional programming in Python
Functional programming in PythonFunctional programming in Python
Functional programming in Python
 
Web2py Code Lab
Web2py Code LabWeb2py Code Lab
Web2py Code Lab
 
A Tour of Google Cloud Platform
A Tour of Google Cloud PlatformA Tour of Google Cloud Platform
A Tour of Google Cloud Platform
 
Introduction to Facebook JavaScript & Python SDK
Introduction to Facebook JavaScript & Python SDKIntroduction to Facebook JavaScript & Python SDK
Introduction to Facebook JavaScript & Python SDK
 
Introduction to MapReduce & hadoop
Introduction to MapReduce & hadoopIntroduction to MapReduce & hadoop
Introduction to MapReduce & hadoop
 
Introduction to Google App Engine
Introduction to Google App EngineIntroduction to Google App Engine
Introduction to Google App Engine
 
Django Deployer
Django DeployerDjango Deployer
Django Deployer
 
Introduction to Google - the most natural way to learn English (English Speech)
Introduction to Google - the most natural way to learn English (English Speech)Introduction to Google - the most natural way to learn English (English Speech)
Introduction to Google - the most natural way to learn English (English Speech)
 
How to Speak Charms Like a Wizard
How to Speak Charms Like a WizardHow to Speak Charms Like a Wizard
How to Speak Charms Like a Wizard
 
房地產報告
房地產報告房地產報告
房地產報告
 
Introduction to Facebook Javascript SDK (NEW)
Introduction to Facebook Javascript SDK (NEW)Introduction to Facebook Javascript SDK (NEW)
Introduction to Facebook Javascript SDK (NEW)
 
Introduction to Facebook Python API
Introduction to Facebook Python APIIntroduction to Facebook Python API
Introduction to Facebook Python API
 
Facebook Python SDK - Introduction
Facebook Python SDK - IntroductionFacebook Python SDK - Introduction
Facebook Python SDK - Introduction
 
Web Programming - 1st TA Session
Web Programming - 1st TA SessionWeb Programming - 1st TA Session
Web Programming - 1st TA Session
 
Nested List Comprehension and Binary Search
Nested List Comprehension and Binary SearchNested List Comprehension and Binary Search
Nested List Comprehension and Binary Search
 
Python-List comprehension
Python-List comprehensionPython-List comprehension
Python-List comprehension
 
Python-FileIO
Python-FileIOPython-FileIO
Python-FileIO
 
Python Dictionary
Python DictionaryPython Dictionary
Python Dictionary
 

Dernier

SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
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
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
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
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
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
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 

Dernier (20)

SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
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
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
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.
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
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
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 

Introduction to Git

  • 1. Introduction to Git Version Control System
  • 2. Who am I • LittleQ, junior student@ NCCUCS • Software engineer @ Genie Capital • Co-organizer @ Taipei Google Tech User Group • Instructor @ Geego system, Inc • http://about.me/littleq • Python, Linux and everything geeky! Git Introduction Version Control System
  • 3. What is Git • Version control system • Coding history • Distributed version control Git Introduction Version Control System
  • 4. Version False True commit  296fad37b4e3e78bd952d419625d87f52a3d52d4 Diablo I Merge:  e5fb1da  fe68f70 Author:  Jacob  Thornton  <jacobthornton@gmail.com> Date:      Thu  Nov  24  11:13:33  2011  -­‐0800 Diablo II        新增⼀一行很重要的code,把bug給修好了! Diablo III (5/15) commit  fe68f708ce723cef640c1cf784cb29da513bca22 Starcraft I Author:  Martin  Bean  <martin@mcbwebdesign.co.uk> Date:      Thu  Nov  24  19:06:00  2011  +0000 Starcraft II        樓上對不起!我不小心把你code給砍了=  = Git Introduction Version Control System
  • 5. Why Git • Maintenance • Debug • Responsibility Git Introduction Version Control System
  • 6. History • Developed by Linus Torvalds • Born for improving the development of Linux Kernel Git Introduction Version Control System
  • 7. Who need Git • Real Engineer • Engineers who is working with thousands of thousands of lines of code • Wanna being a contributor of open source projects Git Introduction Version Control System
  • 8. Requirement Git Introduction Version Control System
  • 9. Scenario • Team work • Code management Git Introduction Version Control System
  • 10. Terminology • commit • stage • repository Git Introduction Version Control System
  • 11. Commit commit bf74427f03bc80927f97755772d87e579604cf35 commit 72da1eb5da5596432b0b36534169756f44bae70f commit a9718b877b45f987502357204fdbe0ec7599b46c Git Introduction Version Control System
  • 12. Commit commit inside: diff  -­‐-­‐git  a/omgtt/configs/staging/settings.py  b/omgtt/configs/ staging/settings.py index  a17ad10..932c66a  100644 -­‐-­‐-­‐  a/omgtt/configs/staging/settings.py +++  b/omgtt/configs/staging/settings.py @@  -­‐10,7  +10,7  @@  ADMIN_MEDIA_PREFIX  =  '/static/admin/'  DOWNLOAD_DIRECTORY  =  '/tmp/'    SITE_DOMAIN  =  'omg.demo.gd:3377' +SITE_ID  =  '4ef4509316d5ad652a00001c' -­‐SITE_ID  =  ''      INTERNAL_IPS  =  () Git Introduction Version Control System
  • 13. Let’s rock! Git Introduction Version Control System
  • 14. Steps • Install Git • Setup Git • Initialize your first local repository • Commit, commit and commit! Git Introduction Version Control System
  • 15. Install Git • In Linux, it is just a piece of cake • In Windows, google it Git Introduction Version Control System
  • 16. Using Git on ghost • For using the latest version of git: `export  PATH=”/opt/csw/bin:$PATH”` • Write it down in your ~/.profile • And login again Git Introduction Version Control System
  • 17. Setup Git • Username git config --global user.name “LittleQ” • Email git config --global user.email “your email” Git Introduction Version Control System
  • 18. Repo init • Get into your project’s root directory • `git init` • `git add .` • `git commit -m “first commit”` Git Introduction Version Control System
  • 19. Commit • the basic unit of modified records • changes can be on single file or multiple files • can be deleting files or adding files Git Introduction Version Control System
  • 20. Make a commit • Make the modifications • `git status` • `git add <modified-files>` • `git commit -m “message”` Git Introduction Version Control System
  • 21. Push & Pull • Push: send your modifications to the server • Pull: receive the modifications from others • `git pull` • `git push origin master` Git Introduction Version Control System
  • 22. Clone a Repo • git clone <git-repo-url> Git Introduction Version Control System
  • 23. Github • A social website of engineers (Engineering version Facebook) • Easy to manage your git repo • Socialize your work Git Introduction Version Control System
  • 24. Exercise • Here we are going to create a repo and build a simple Hello World program on it • We won’t do much programming stuff, so please concentrate • Now pick up 3 members (Included yourself ) to form a group goo.gl/C2vFG Git Introduction Version Control System
  • 25. Sign Up • Just go to sign up an account on Github • Find out the profile page of your teammates and follow them on github • Choose one as the leader and the one need to create a repo and add others members as the repo members Git Introduction Version Control System
  • 26. Create a Repo and Push to Server • mkdir teamXX; cd teamXX; • git init • git remote add origin <url-of-repo> • git add . • git commit -m “first commit” • git push origin master Git Introduction Version Control System
  • 27. Prototype of HW cp  /usr/local/class/mathcp/materials/git  ~/TeamXX #  comments #  teamXX #  99XXXXXX,  99XXXXXX,  99XXXXXX function  hello1()  { print(“hello,  member1’s  name”); } function  hello2()  { print(“hello,  member2’s  name”); } function  hello3()  {    print(“hello,  member2’s  name”); } function  main()  {    hello1();    hello2();    hello3(); } Git Introduction Version Control System
  • 28. Notice • Each function can only be completed by one and different from others • Need to push onto github • If someone got stuck, help each other Git Introduction Version Control System
  • 29. And More... • Branch • Merge • Remote Git Introduction Version Control System
  • 30. Repository Hosting • Google Code (free) • Github (free) • Bitbucket (free, private repo) • unfuddle • repositoryhosting Git Introduction Version Control System
  • 31. Resource • Git http://git-scm.com/ • Github help http://help.github.com/ • iHower blog http://ihower.tw/blog/posts > Git category Git Introduction Version Control System
  • 32. The End Git Introduction Version Control System