SlideShare una empresa de Scribd logo
1 de 32
Descargar para leer sin conexión
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

Más contenido relacionado

La actualidad más candente

Github - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsGithub - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsLee Hanxue
 
GIT presentation
GIT presentationGIT presentation
GIT presentationNaim Latifi
 
Git - An Introduction
Git - An IntroductionGit - An Introduction
Git - An IntroductionBehzad Altaf
 
Starting with Git & GitHub
Starting with Git & GitHubStarting with Git & GitHub
Starting with Git & GitHubNicolás Tourné
 
Git - Basic Crash Course
Git - Basic Crash CourseGit - Basic Crash Course
Git - Basic Crash CourseNilay Binjola
 
Git One Day Training Notes
Git One Day Training NotesGit One Day Training Notes
Git One Day Training Notesglen_a_smith
 
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 Lab Introduction
Git Lab IntroductionGit Lab Introduction
Git Lab IntroductionKrunal Doshi
 
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
 
Git hub ppt presentation
Git hub ppt presentationGit hub ppt presentation
Git hub ppt presentationAyanaRukasar
 
Git and Github slides.pdf
Git and Github slides.pdfGit and Github slides.pdf
Git and Github slides.pdfTilton2
 
Introduction to Gitlab | Gitlab 101 | Training Session
Introduction to Gitlab | Gitlab 101 | Training SessionIntroduction to Gitlab | Gitlab 101 | Training Session
Introduction to Gitlab | Gitlab 101 | Training SessionAnwarul Islam
 
Learning git
Learning gitLearning git
Learning gitSid Anand
 

La actualidad más candente (20)

Git n git hub
Git n git hubGit n git hub
Git n git hub
 
Github - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsGithub - Git Training Slides: Foundations
Github - Git Training Slides: Foundations
 
GIT presentation
GIT presentationGIT presentation
GIT presentation
 
Git 101 for Beginners
Git 101 for Beginners Git 101 for Beginners
Git 101 for Beginners
 
Git - An Introduction
Git - An IntroductionGit - An Introduction
Git - An Introduction
 
Starting with Git & GitHub
Starting with Git & GitHubStarting with Git & GitHub
Starting with Git & GitHub
 
Introducing GitLab
Introducing GitLabIntroducing GitLab
Introducing GitLab
 
Git - Basic Crash Course
Git - Basic Crash CourseGit - Basic Crash Course
Git - Basic Crash Course
 
Git One Day Training Notes
Git One Day Training NotesGit One Day Training Notes
Git One Day Training Notes
 
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
GithubGithub
Github
 
Git Lab Introduction
Git Lab IntroductionGit Lab Introduction
Git Lab Introduction
 
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 hub ppt presentation
Git hub ppt presentationGit hub ppt presentation
Git hub ppt presentation
 
GitLab.pptx
GitLab.pptxGitLab.pptx
GitLab.pptx
 
Git and Github slides.pdf
Git and Github slides.pdfGit and Github slides.pdf
Git and Github slides.pdf
 
Introduction to Gitlab | Gitlab 101 | Training Session
Introduction to Gitlab | Gitlab 101 | Training SessionIntroduction to Gitlab | Gitlab 101 | Training Session
Introduction to Gitlab | Gitlab 101 | Training Session
 
Git and Github
Git and GithubGit and Github
Git and Github
 
Git and github
Git and githubGit and github
Git and github
 
Learning git
Learning gitLearning git
Learning git
 

Destacado

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
 

Destacado (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
 

Similar a 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
 

Similar a 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
 

Más 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
 

Más 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
 

Último

[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
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
 
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
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
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
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 

Último (20)

[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
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
 
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
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
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
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 

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