SlideShare a Scribd company logo
2 0 1 4 . 1 1 . 1 9 WI L L IAM WANG 
VERSION CONTROL : 
GI T 
1
WHAT IS VERSION CONTROL 
2
LOCAL VERSION CONTROL 
SYSTEMS 
A simple database that kept 
all the changes to files under 
revision control 
3
CENTRAL I ZED VERSION 
CONTROL SYSTEMS 
LVCS PROBLEM: 
People need to collaborate with 
developers on other systems. 
CVCS SOLUT ION: 
A single server that contains all the 
versioned files, and a number of 
clients that check out files from that 
central place. 
4
DISTRIBUTED VERSION 
CONTROL SYSTEMS 
LVCS,CVCS PROBLEM: 
Whenever you have the entire 
history of the project in a single 
place, you risk losing everything. 
DVCS SOLUT ION: 
In a DVCS (such as Git, Mercurial, 
Bazaar or Darcs), clients don’t just check 
out the latest .snapshot of the files: they 
fully mirror the repository. 
5
INTRODUCE GI T 
• The origin of all things - Linux Kernel (1991– 
2002) 
• From BitKeeper to Git(2005)-Linus Torvalds 
(Linux Creator) and the community develop their 
own tool based on some of the lessons they 
learned while using BitKeeper. 
• Fast Speed(write in C)、Simple Design、Strong 
support for non-linear development(Thousands 
of parallel branches) 、Fully Distributed、Able 
to handle large projects 
• Who use git for developing? 
• Eclipse,RoR,Android,jQuery,PHP……
OTHER VCS 
MOST OTHER SYSTEMS STORE INFORMAT ION AS A L IST OF 
F I LE-BASED CHANGES 
7
GI T 
1 .EVERY T IME YOU COMMI T , OR SAVE THE STATE. I T BASICAL LY TAKES 
A PICTURE OF WHAT AL L YOUR F I LES LOOK L IKE AT THAT MOMENT 
AND STORES A REFERENCE TO THAT SNAPSHOT . 
2 . I F F I L E S H A V E N O T C H A N G E D , G I T D O E S N ’ T S T O R E T H E F I L E A G A I N , 
JUST A L INK TO THE PREVIOUS IDENT ICAL F I LE I T HAS ALREADY 
STORED. 
3 .GI T THINKS ABOUT I TS DATA MORE L IKE A STREAM OF SNAPSHOTS. 
8
GI T BASICS 
• Nearly Every Operation Is Local 
• You have the entire history of the project right there on your local disk. 
• Git Has Integrity 
• Everything in Git is check-summed before it is stored and is then 
referred to by that checksum. 
• Git uses SHA-1 hash for checksumming and it calculated based on the 
contents of a file or directory structure in Git. 
Looks like: 24b9da6552252987aa493b52f8696cd6d3b00373 
• Git Generally Only Adds Data 
• The Three States
GI T BASICS - THE THREE STATES 
• Three main sections of a Git project: Git directory, Working directory, Staging area. 
• Three main states that your files can reside in: Committed, Modified, Staged. 
• Committed means that the data is safely stored in your local database. 
• Modified means that you have changed the file but have not committed it to your database yet. 
• Staged means that you have marked a modified file in its current version to go into your next 
commit snapshot
I N S T A L L G I T ( M A C , L I N U X … ) 
• Mac OS X 
• OS X has default git, so if you want to get the latest 
version, you can use some pkm(mac ports,homebrew…) 
• Linux 
• Debian-based:#apt-get install git 
• Redhat-based:#yum install git 
• … 
11
INSTAL L GI T (WINDOWS) 
12
INSTAL L GI T (WINDOWS) 
13
INSTAL L GI T (WINDOWS) 
14
INSTAL L GI T (WINDOWS) 
15
INSTAL L GI T (WINDOWS) 
16
INSTAL L GI T (WINDOWS) 
17
INSTAL L GI T (WINDOWS) 
18
INSTAL L GI T (WINDOWS) 
19
INSTAL L GI T (WINDOWS) 
20
INSTAL L GI T (WINDOWS) 
21
GI T COMMAND 
mkdir helloGit 
cd helloGit 
git init
GI T COMMAND 
echo ‘Hi,git’> README.md 
git status 
git add READE.md 
git status 
git commit -m ‘First commit with README’ 
git status 
23
GI T COMMAND 
git remote add origin URL 
git push -u origin --all 
GitHub大冒險by Muan@JSDC2014: 
https://www.youtube.com/watch?v=5YX33tyJfOI&index=21&list=PL8dIIwCMF-SN8ZOY1NgSrj-WkYb112glF 
Teaching Git and GitHub with Node.js by 
Jessica@JSDC2014: 
https://www.youtube.com/watch?v=vH8koy9DtLY&index=14&list=PL8dIIwCMF-SN8ZOY1NgSrj-WkYb112glF
GI T COMMAND 
git branch 
git branch newBranch 
git branch 
git checkout newBranch 
echo ‘This is a newBranch edit’ >> README.md 
git status 
git add . 
git commit -m ‘commite on newBranch and edit README.md’ 
git checkout master 
echo ‘Try to make some confilts’ >> README.md 
git add . && git commit ‘master edit before merge’ 
git merge newBranch 
//Solve the conflict 
git add . 
git commit -m ‘We merge these two branches’ 
git push -u origin --all 
25
TRY MORE 
git clone [URL] 
git checkout [commit hash value] 
git rebase [branch name] 
… 
… 
… 
For you to reference: 
http://blog.gogojimmy.net/2012/02/29/git-scenario/ 
http://www.draconianoverlord.com/git-workshop.html 
http://isis.apache.org/contributors/git-cookbook.html 
https://github.com/ulrich/useful-git-command 
26
PRACT ICE:GI T I T 
• git it:https://github.com/jlord/git-it 
27
REFERENCE 
Git: 
http://git-scm.com/ 
CodeSchool Try Git: 
https://www.codeschool.com/courses/try-git 
ihower’s blog: 
http://ihower.tw/git/ 
gugod’s blog: 
http://gugod.org/2009/12/git-graphing/ 
唐維佋’s slides: 
http://www.slideshare.net/pa4373/git-git-hub-34165878 
Hsiao-Ting Yu’s slides: 
http://www.slideshare.net/littlebtc/git-5528339 
28
THANKS, 
AND 
HAPPY WI TH GI T

More Related Content

What's hot

Git Introduction
Git IntroductionGit Introduction
Git Introduction
Gareth Hall
 
A Practical Introduction to git
A Practical Introduction to gitA Practical Introduction to git
A Practical Introduction to git
Emanuele Olivetti
 
Git meanings of -distributed-
Git  meanings of -distributed-Git  meanings of -distributed-
Git meanings of -distributed-
dchaffiol
 
Git Heaven with Wakanda
Git Heaven with WakandaGit Heaven with Wakanda
Git Heaven with Wakanda
Juergen Fesslmeier
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
Colin Su
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
Yan Vugenfirer
 
Git training with Devaamo
Git training with DevaamoGit training with Devaamo
Git training with Devaamo
Otto Kekäläinen
 
Git in 10 minutes
Git in 10 minutesGit in 10 minutes
Git in 10 minutes
Safique Ahmed Faruque
 
GIT - DUG Antwerp
GIT - DUG AntwerpGIT - DUG Antwerp
GIT - DUG Antwerp
Krimson
 
News from Git in Eclipse - EclipseCon EU - 2016-10-26
News from Git in Eclipse - EclipseCon EU - 2016-10-26News from Git in Eclipse - EclipseCon EU - 2016-10-26
News from Git in Eclipse - EclipseCon EU - 2016-10-26
msohn
 
Git & G
Git & GGit & G
Git & G
SangJung Woo
 
Helios in Action: Git at Eclipse
Helios in Action: Git at EclipseHelios in Action: Git at Eclipse
Helios in Action: Git at Eclipse
Chris Aniszczyk
 
Git & GitHub
Git & GitHubGit & GitHub
Git & GitHub
SangJung Woo
 
Git in Eclipse
Git in EclipseGit in Eclipse
Git in Eclipse
Dariusz Łuksza
 
Git & git hub
Git & git hubGit & git hub
Git & git hub
PreetikaKanojia
 
Introduction to Git and Github
Introduction to Git and Github Introduction to Git and Github
Introduction to Git and Github
Max Claus Nunes
 
Git 101
Git 101Git 101
Git 101
jayrparro
 
Git Basic
Git BasicGit Basic
Git Basic
Luke Luo
 
Contributing to open source using Git
Contributing to open source using GitContributing to open source using Git
Contributing to open source using Git
Yan Vugenfirer
 
Git for a newbie
Git for a newbieGit for a newbie
Git for a newbie
Anuj Sharma
 

What's hot (20)

Git Introduction
Git IntroductionGit Introduction
Git Introduction
 
A Practical Introduction to git
A Practical Introduction to gitA Practical Introduction to git
A Practical Introduction to git
 
Git meanings of -distributed-
Git  meanings of -distributed-Git  meanings of -distributed-
Git meanings of -distributed-
 
Git Heaven with Wakanda
Git Heaven with WakandaGit Heaven with Wakanda
Git Heaven with Wakanda
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Git training with Devaamo
Git training with DevaamoGit training with Devaamo
Git training with Devaamo
 
Git in 10 minutes
Git in 10 minutesGit in 10 minutes
Git in 10 minutes
 
GIT - DUG Antwerp
GIT - DUG AntwerpGIT - DUG Antwerp
GIT - DUG Antwerp
 
News from Git in Eclipse - EclipseCon EU - 2016-10-26
News from Git in Eclipse - EclipseCon EU - 2016-10-26News from Git in Eclipse - EclipseCon EU - 2016-10-26
News from Git in Eclipse - EclipseCon EU - 2016-10-26
 
Git & G
Git & GGit & G
Git & G
 
Helios in Action: Git at Eclipse
Helios in Action: Git at EclipseHelios in Action: Git at Eclipse
Helios in Action: Git at Eclipse
 
Git & GitHub
Git & GitHubGit & GitHub
Git & GitHub
 
Git in Eclipse
Git in EclipseGit in Eclipse
Git in Eclipse
 
Git & git hub
Git & git hubGit & git hub
Git & git hub
 
Introduction to Git and Github
Introduction to Git and Github Introduction to Git and Github
Introduction to Git and Github
 
Git 101
Git 101Git 101
Git 101
 
Git Basic
Git BasicGit Basic
Git Basic
 
Contributing to open source using Git
Contributing to open source using GitContributing to open source using Git
Contributing to open source using Git
 
Git for a newbie
Git for a newbieGit for a newbie
Git for a newbie
 

Similar to Git

Git
GitGit
Presentation on Repository Control System
Presentation on Repository Control SystemPresentation on Repository Control System
Presentation on Repository Control System
Md. Mujahid Islam
 
3 Git
3 Git3 Git
1-Intro to VC & GIT PDF.pptx
1-Intro to VC & GIT PDF.pptx1-Intro to VC & GIT PDF.pptx
1-Intro to VC & GIT PDF.pptx
HuthaifaAlmaqrami1
 
git and github-1.pptx
git and github-1.pptxgit and github-1.pptx
git and github-1.pptx
tnscharishma
 
Git basic and workflow
Git basic and workflowGit basic and workflow
Git basic and workflow
buikhanhbk
 
Git hub
Git hubGit hub
Git hub
Nitin Goel
 
Git extension-training
Git extension-trainingGit extension-training
Git extension-training
Eric Guo
 
What the git? - SAP Inside Track Munich 2016
What the git?  - SAP Inside Track Munich 2016What the git?  - SAP Inside Track Munich 2016
What the git? - SAP Inside Track Munich 2016
Hendrik Neumann
 
Introduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech ArticleIntroduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech Article
PRIYATHAMDARISI
 
git presentation
git presentation git presentation
git presentation
Belal Quamar
 
Introduction to git hub
Introduction to git hubIntroduction to git hub
Introduction to git hub
Naveen Pandey
 
Mini git tutorial
Mini git tutorialMini git tutorial
Mini git tutorial
Cristian Lucchesi
 
Git.odp 0
Git.odp 0Git.odp 0
Git.odp 0
Mannu Malhotra
 
Enterprise git
Enterprise gitEnterprise git
Enterprise git
Pedro Melo
 
Source Code Management with Git
Source Code Management with GitSource Code Management with Git
Source Code Management with Git
Things Lab
 
ePOM - Fundamentals of Research Software Development - Code Version Control
ePOM - Fundamentals of Research Software Development - Code Version ControlePOM - Fundamentals of Research Software Development - Code Version Control
ePOM - Fundamentals of Research Software Development - Code Version Control
Giuseppe Masetti
 
Version Control with Git
Version Control with GitVersion Control with Git
Version Control with Git
Sahil Agarwal
 
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 git
Introduction gitIntroduction git
Introduction git
Dian Sigit Prastowo
 

Similar to Git (20)

Git
GitGit
Git
 
Presentation on Repository Control System
Presentation on Repository Control SystemPresentation on Repository Control System
Presentation on Repository Control System
 
3 Git
3 Git3 Git
3 Git
 
1-Intro to VC & GIT PDF.pptx
1-Intro to VC & GIT PDF.pptx1-Intro to VC & GIT PDF.pptx
1-Intro to VC & GIT PDF.pptx
 
git and github-1.pptx
git and github-1.pptxgit and github-1.pptx
git and github-1.pptx
 
Git basic and workflow
Git basic and workflowGit basic and workflow
Git basic and workflow
 
Git hub
Git hubGit hub
Git hub
 
Git extension-training
Git extension-trainingGit extension-training
Git extension-training
 
What the git? - SAP Inside Track Munich 2016
What the git?  - SAP Inside Track Munich 2016What the git?  - SAP Inside Track Munich 2016
What the git? - SAP Inside Track Munich 2016
 
Introduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech ArticleIntroduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech Article
 
git presentation
git presentation git presentation
git presentation
 
Introduction to git hub
Introduction to git hubIntroduction to git hub
Introduction to git hub
 
Mini git tutorial
Mini git tutorialMini git tutorial
Mini git tutorial
 
Git.odp 0
Git.odp 0Git.odp 0
Git.odp 0
 
Enterprise git
Enterprise gitEnterprise git
Enterprise git
 
Source Code Management with Git
Source Code Management with GitSource Code Management with Git
Source Code Management with Git
 
ePOM - Fundamentals of Research Software Development - Code Version Control
ePOM - Fundamentals of Research Software Development - Code Version ControlePOM - Fundamentals of Research Software Development - Code Version Control
ePOM - Fundamentals of Research Software Development - Code Version Control
 
Version Control with Git
Version Control with GitVersion Control with Git
Version Control with Git
 
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
 
Introduction git
Introduction gitIntroduction git
Introduction git
 

Recently uploaded

TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Zilliz
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
TIPNGVN2
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 

Recently uploaded (20)

TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 

Git

  • 1. 2 0 1 4 . 1 1 . 1 9 WI L L IAM WANG VERSION CONTROL : GI T 1
  • 2. WHAT IS VERSION CONTROL 2
  • 3. LOCAL VERSION CONTROL SYSTEMS A simple database that kept all the changes to files under revision control 3
  • 4. CENTRAL I ZED VERSION CONTROL SYSTEMS LVCS PROBLEM: People need to collaborate with developers on other systems. CVCS SOLUT ION: A single server that contains all the versioned files, and a number of clients that check out files from that central place. 4
  • 5. DISTRIBUTED VERSION CONTROL SYSTEMS LVCS,CVCS PROBLEM: Whenever you have the entire history of the project in a single place, you risk losing everything. DVCS SOLUT ION: In a DVCS (such as Git, Mercurial, Bazaar or Darcs), clients don’t just check out the latest .snapshot of the files: they fully mirror the repository. 5
  • 6. INTRODUCE GI T • The origin of all things - Linux Kernel (1991– 2002) • From BitKeeper to Git(2005)-Linus Torvalds (Linux Creator) and the community develop their own tool based on some of the lessons they learned while using BitKeeper. • Fast Speed(write in C)、Simple Design、Strong support for non-linear development(Thousands of parallel branches) 、Fully Distributed、Able to handle large projects • Who use git for developing? • Eclipse,RoR,Android,jQuery,PHP……
  • 7. OTHER VCS MOST OTHER SYSTEMS STORE INFORMAT ION AS A L IST OF F I LE-BASED CHANGES 7
  • 8. GI T 1 .EVERY T IME YOU COMMI T , OR SAVE THE STATE. I T BASICAL LY TAKES A PICTURE OF WHAT AL L YOUR F I LES LOOK L IKE AT THAT MOMENT AND STORES A REFERENCE TO THAT SNAPSHOT . 2 . I F F I L E S H A V E N O T C H A N G E D , G I T D O E S N ’ T S T O R E T H E F I L E A G A I N , JUST A L INK TO THE PREVIOUS IDENT ICAL F I LE I T HAS ALREADY STORED. 3 .GI T THINKS ABOUT I TS DATA MORE L IKE A STREAM OF SNAPSHOTS. 8
  • 9. GI T BASICS • Nearly Every Operation Is Local • You have the entire history of the project right there on your local disk. • Git Has Integrity • Everything in Git is check-summed before it is stored and is then referred to by that checksum. • Git uses SHA-1 hash for checksumming and it calculated based on the contents of a file or directory structure in Git. Looks like: 24b9da6552252987aa493b52f8696cd6d3b00373 • Git Generally Only Adds Data • The Three States
  • 10. GI T BASICS - THE THREE STATES • Three main sections of a Git project: Git directory, Working directory, Staging area. • Three main states that your files can reside in: Committed, Modified, Staged. • Committed means that the data is safely stored in your local database. • Modified means that you have changed the file but have not committed it to your database yet. • Staged means that you have marked a modified file in its current version to go into your next commit snapshot
  • 11. I N S T A L L G I T ( M A C , L I N U X … ) • Mac OS X • OS X has default git, so if you want to get the latest version, you can use some pkm(mac ports,homebrew…) • Linux • Debian-based:#apt-get install git • Redhat-based:#yum install git • … 11
  • 12. INSTAL L GI T (WINDOWS) 12
  • 13. INSTAL L GI T (WINDOWS) 13
  • 14. INSTAL L GI T (WINDOWS) 14
  • 15. INSTAL L GI T (WINDOWS) 15
  • 16. INSTAL L GI T (WINDOWS) 16
  • 17. INSTAL L GI T (WINDOWS) 17
  • 18. INSTAL L GI T (WINDOWS) 18
  • 19. INSTAL L GI T (WINDOWS) 19
  • 20. INSTAL L GI T (WINDOWS) 20
  • 21. INSTAL L GI T (WINDOWS) 21
  • 22. GI T COMMAND mkdir helloGit cd helloGit git init
  • 23. GI T COMMAND echo ‘Hi,git’> README.md git status git add READE.md git status git commit -m ‘First commit with README’ git status 23
  • 24. GI T COMMAND git remote add origin URL git push -u origin --all GitHub大冒險by Muan@JSDC2014: https://www.youtube.com/watch?v=5YX33tyJfOI&index=21&list=PL8dIIwCMF-SN8ZOY1NgSrj-WkYb112glF Teaching Git and GitHub with Node.js by Jessica@JSDC2014: https://www.youtube.com/watch?v=vH8koy9DtLY&index=14&list=PL8dIIwCMF-SN8ZOY1NgSrj-WkYb112glF
  • 25. GI T COMMAND git branch git branch newBranch git branch git checkout newBranch echo ‘This is a newBranch edit’ >> README.md git status git add . git commit -m ‘commite on newBranch and edit README.md’ git checkout master echo ‘Try to make some confilts’ >> README.md git add . && git commit ‘master edit before merge’ git merge newBranch //Solve the conflict git add . git commit -m ‘We merge these two branches’ git push -u origin --all 25
  • 26. TRY MORE git clone [URL] git checkout [commit hash value] git rebase [branch name] … … … For you to reference: http://blog.gogojimmy.net/2012/02/29/git-scenario/ http://www.draconianoverlord.com/git-workshop.html http://isis.apache.org/contributors/git-cookbook.html https://github.com/ulrich/useful-git-command 26
  • 27. PRACT ICE:GI T I T • git it:https://github.com/jlord/git-it 27
  • 28. REFERENCE Git: http://git-scm.com/ CodeSchool Try Git: https://www.codeschool.com/courses/try-git ihower’s blog: http://ihower.tw/git/ gugod’s blog: http://gugod.org/2009/12/git-graphing/ 唐維佋’s slides: http://www.slideshare.net/pa4373/git-git-hub-34165878 Hsiao-Ting Yu’s slides: http://www.slideshare.net/littlebtc/git-5528339 28
  • 29. THANKS, AND HAPPY WI TH GI T