SlideShare a Scribd company logo
1 of 32
Download to read offline
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

More Related Content

What's hot

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
 
Github - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsGithub - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsLee Hanxue
 
Git and Github slides.pdf
Git and Github slides.pdfGit and Github slides.pdf
Git and Github slides.pdfTilton2
 
Git and GitHub workflows
Git and GitHub workflowsGit and GitHub workflows
Git and GitHub workflowsArthur Shvetsov
 
Git with bitbucket
Git with bitbucketGit with bitbucket
Git with bitbucketSumin Byeon
 
Introduction to Git and GitHub
Introduction to Git and GitHubIntroduction to Git and GitHub
Introduction to Git and GitHubVikram SV
 
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 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using GitGit 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using GitGeoff Hoffman
 

What's hot (20)

git and github
git and githubgit and github
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 ...
 
Git for beginners
Git for beginnersGit for beginners
Git for beginners
 
GitHub Basics - Derek Bable
GitHub Basics - Derek BableGitHub Basics - Derek Bable
GitHub Basics - Derek Bable
 
Github - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsGithub - Git Training Slides: Foundations
Github - Git Training Slides: Foundations
 
Git basics
Git basicsGit basics
Git basics
 
Git 101
Git 101Git 101
Git 101
 
Git and github 101
Git and github 101Git and github 101
Git and github 101
 
Git and Github slides.pdf
Git and Github slides.pdfGit and Github slides.pdf
Git and Github slides.pdf
 
Git and GitHub workflows
Git and GitHub workflowsGit and GitHub workflows
Git and GitHub workflows
 
Introduction git
Introduction gitIntroduction git
Introduction git
 
Git with bitbucket
Git with bitbucketGit with bitbucket
Git with bitbucket
 
Introduction to Git and GitHub
Introduction to Git and GitHubIntroduction to Git and GitHub
Introduction to Git and GitHub
 
Github
GithubGithub
Github
 
Git real slides
Git real slidesGit real slides
Git real slides
 
Git vs svn
Git vs svnGit vs svn
Git vs svn
 
Git - An Introduction
Git - An IntroductionGit - An Introduction
Git - An Introduction
 
Git basic
Git basicGit basic
Git basic
 
Starting with Git & GitHub
Starting with Git & GitHubStarting with Git & GitHub
Starting with Git & GitHub
 
Git 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using GitGit 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using Git
 

Viewers also liked

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
 

Viewers also liked (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 to 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
 
Git One Day Training Notes
Git One Day Training NotesGit One Day Training Notes
Git One Day Training Notesglen_a_smith
 

Similar to 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 One Day Training Notes
Git One Day Training NotesGit One Day Training Notes
Git One Day Training Notes
 
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
 

More from 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
 

More from 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
 

Recently uploaded

Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
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
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
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
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 

Recently uploaded (20)

Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
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
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 

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