Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Git: an introduction
Search
Emily Hyland
February 28, 2013
Programming
200
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Git: an introduction
Emily Hyland
February 28, 2013
More Decks by Emily Hyland
See All by Emily Hyland
Programming for Humans
duien
0
68
Testing Ruby
duien
8
650
Other Decks in Programming
See All in Programming
リアルな遅延を測る仕様
kota_yata
1
130
How I Won Prize Money at a Hackathon Using Codex and Symphony Alpha
yasei_no_otoko
0
120
AIの中の人になってみる
htkym
0
120
TSX の <Hoge<Fuga>> という構文に驚いた話 / tsx-type-argument-syntax
kanaru0928
0
240
「つくるAI」だけではバグは見つからない ~テストに必要な「見つけるAI」を分離させる戦略~
mfunaki
0
180
DynamoDBの基礎を振り返りながらベクトル検索機能を理解する
musan
2
200
いまどきの Codex で開発する visionOS アプリの開発スタイルについて
karad
0
160
komatsuna「分散システムにおけるバグ分析手法」
komatsunaqa
0
280
引き算の組織 ― アウトカムとAIに全振りするために辞めたこと ― / Organization by Subtraction
hirokiyamamoto14
PRO
0
300
「寝てても仕事が進む」Claude Codeで組む第二の脳
tomoyafujita2016
0
360
[PyCon KR 2026] More Variants, More Diversity for AI Accelerators
achimnol
0
110
仕様書を書く前にハーネスを作る - Agent Native開発は「探索を速く、判定を固く」
gotalab555
4
1.8k
Featured
See All Featured
Six Lessons from altMBA
skipperchong
29
4.5k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
220
Agile that works and the tools we love
rasmusluckow
331
22k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
WENDY [Excerpt]
tessaabrams
11
39k
The browser strikes back
jonoalderson
0
1.5k
So, you think you're a good person
axbom
PRO
2
2.1k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Utilizing Notion as your number one productivity tool
mfonobong
4
550
How to train your dragon (web standard)
notwaldorf
97
6.8k
Optimising Largest Contentful Paint
csswizardry
37
3.9k
Transcript
Git an introduction
Rails Girls ATL
[email protected]
Emily Price ✉ Text Text
What is git?
Git is a distributed version control system
a version control system OK, so what is
a version control system
version snapshot of managed files a version control system
version snapshot of managed files control save and retrieve versions
a version control system
version snapshot of managed files control save and retrieve versions
system set of integrated tools a version control system
version snapshot of managed files control save and retrieve versions
system set of integrated tools a version control system
Git is a version control system
Git is a set of integrated tools to save and
retrieve snapshots of managed files
What does it mean that git is distributed?
Let’s talk history
In the beginning... there was local version control
And then for teams... there was central version control
Which evolved into... distributed version control
What does it mean that git is distributed?
What does it mean that git is distributed?
What does it mean that git is distributed? No central
server necessary
What does it mean that git is distributed? No central
server necessary Every copy contains full history
What does it mean that git is distributed? No central
server necessary Every copy contains full history Most operations don’t require network
Why use version control?
Why use version control?
Why use version control? Allow rewinding changes
Why use version control? Allow rewinding changes Easier to collaborate
Why use version control? Allow rewinding changes Easier to collaborate
See when something changed
Terminology
Git has a lot of terminology
repository working directory commit index the full set of files
and history lives in .git directory the visible files of your project everything outside of .git a snapshot of your project staging area for next commit
remote repository local repository working directory index pull fetch push
commit add checkout clone
remote repository local repository working directory index pull fetch push
commit add checkout clone
remote repository local repository working directory index fetch push commit
add checkout clone pull
remote repository working directory index fetch push commit add checkout
clone local repository pull
remote repository local repository working directory index fetch push commit
add checkout clone pull
remote repository local repository working directory index fetch push commit
add checkout clone pull
remote repository local repository working directory index fetch push commit
add checkout clone pull
remote repository local repository working directory index fetch push commit
add checkout clone pull
remote repository local repository working directory index fetch push commit
add checkout clone pull
remote repository local repository working directory index fetch push commit
add checkout clone pull
remote repository local repository working directory index fetch push commit
add checkout clone pull
remote repository local repository working directory index fetch push commit
add checkout clone pull
remote repository local repository working directory index fetch push commit
add checkout clone pull
remote repository local repository working directory index fetch push commit
add checkout clone pull
The anatomy of a commit
Every commit is identified by a SHA1 hash
A hash function maps data of variable length to data
of fixed length, predictably
Digest::SHA1.hexdigest('foo') 0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33 SHA1
Git hashes the contents and attributes of a commit
Actions contents attributes files and directories changed, added or deleted
SHA of parent commit message
c14f2de blob a20b616 blob bc4d0fb blob commit tree parent author
committer message 000742a 38a0164 1f62407 duien duien ... tree tree blob 38a0164 7095bff bc4d0fb tree blob blob 7095bff c14f2de a20b616
Branching and merging
time
time master HEAD
time master HEAD
time master HEAD
time master HEAD
time comments HEAD master
time comments HEAD master
time comments master HEAD
time master HEAD comments
time master comments HEAD
time master comments HEAD
time master comments HEAD
time comments master HEAD
time master comments HEAD
time master comments HEAD
time master comments HEAD
time master comments HEAD
time master comments HEAD
time master comments HEAD
time master comments HEAD
Putting it into practice
GitHub has good install guides at help.github.com
Make a git repo for your Rails Girls projects
DEMO
git-scm.com try.github.com help.github.com ndpsoftware.com/git-cheatsheet.html More Resources