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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Emily Hyland
February 28, 2013
Programming
200
3
Share
Git: an introduction
Emily Hyland
February 28, 2013
More Decks by Emily Hyland
See All by Emily Hyland
Programming for Humans
duien
0
55
Testing Ruby
duien
8
640
Other Decks in Programming
See All in Programming
書籍「ユーザーストーリーマッピング」が私のバイブル
asumikam
4
390
ハーネスエンジニアリングにどう向き合うか 〜ルールファイルを超えて開発プロセスを設計する〜 / How to approach harness engineering
rkaga
24
14k
PHP で mp3 プレイヤーを実装しよう
m3m0r7
PRO
0
280
YJITとZJITにはイカなる違いがあるのか?
nakiym
0
240
年間50登壇、単著出版、雑誌寄稿、Podcast出演、YouTube、CM、カンファレンス主催……全部やってみたので面白さ等を比較してみよう / I’ve tried them all, so let’s compare how interesting they are.
nrslib
4
800
Angular Signal Forms
debug_mode
0
110
Lightning-Fast Method Calls with Ruby 4.1 ZJIT / RubyKaigi 2026
k0kubun
3
940
JOAI2026 1st solution - heron0519 -
heron0519
0
140
「話せることがない」を乗り越える 〜日常業務から登壇テーマをつくる思考法〜
shoheimitani
4
840
How We Benchmarked Quarkus: Patterns and anti-patterns
hollycummins
1
150
実用!Hono RPC2026
yodaka
2
250
感情を設計する
ichimichi
5
1.5k
Featured
See All Featured
エンジニアに許された特別な時間の終わり
watany
106
240k
RailsConf 2023
tenderlove
30
1.4k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Scaling GitHub
holman
464
140k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.9k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
170
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
300
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
10k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
120
From π to Pie charts
rasagy
0
170
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
180
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
280
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