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 (Agile Day)
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Mindaugas Mozūras
May 22, 2012
Programming
7
550
git (Agile Day)
Introduction to Git. A presentation I gave at Agile Day.
Mindaugas Mozūras
May 22, 2012
Tweet
Share
More Decks by Mindaugas Mozūras
See All by Mindaugas Mozūras
Sustainable Speed
mmozuras
0
640
The Secret
mmozuras
0
330
Am I Still Productive?
mmozuras
0
500
The Three Last Conversations
mmozuras
0
420
Vinted Adventure
mmozuras
0
470
Frequent Releases & Major Changes
mmozuras
1
1.1k
Engineering for Engineering's Sake
mmozuras
1
1.6k
Life Embetterment With Hundreds of Deployments a Day
mmozuras
1
570
How to Build an Open Source Project in 3 Years
mmozuras
2
620
Other Decks in Programming
See All in Programming
コーディングルールの鮮度を保ちたい / keep-fresh-go-internal-conventions
handlename
0
200
GC言語のWasm化とComponent Modelサポートの実践と課題 - Scalaの場合
tanishiking
0
110
AWS Infrastructure as Code の新機能 2025 総まとめ 〜SA 4人による怒涛のデモ祭り〜
konokenj
10
3.4k
ロボットのための工場に灯りは要らない
watany
10
2.9k
DevinとClaude Code、SREの現場で使い倒してみた件
karia
1
1.1k
CDIの誤解しがちな仕様とその対処TIPS
futokiyo
0
220
Swift ConcurrencyでよりSwiftyに
yuukiw00w
0
270
エージェント開発初心者の僕がエージェントを作った話と今後やりたいこと
thasu0123
0
250
米国のサイバーセキュリティタイムラインと見る Goの暗号パッケージの進化
tomtwinkle
2
590
Claude Codeセッション現状確認 2026福岡 / fukuoka-aicoding-00-beacon
monochromegane
4
430
Fundamentals of Software Engineering In the Age of AI
therealdanvega
1
260
The free-lunch guide to idea circularity
hollycummins
0
210
Featured
See All Featured
Darren the Foodie - Storyboard
khoart
PRO
3
2.9k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
640
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
What's in a price? How to price your products and services
michaelherold
247
13k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
860
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
380
SEO for Brand Visibility & Recognition
aleyda
0
4.4k
A Soul's Torment
seathinner
5
2.5k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
110
Fireside Chat
paigeccino
42
3.8k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.4k
Music & Morning Musume
bryan
47
7.1k
Transcript
git or: how I learned to stop worrying and love
source control
None
why you should care
Traditional version control systems have deficiencies
Subversion, Perforce, CVS, TFS...
OH, THE PAIN! SLOW TREE CONFLICTS MERGING IS CHALLENGING BRANCHES
ARE JUST COPIES
using svn
using git
is awesome git
It’s distributed! Distributed Version Control System
Every repository is equal.
You can work offline.
Fast as lightning.
add status diff log commit branch git mercurial bazaar
Very efficient. git clone rails - 53 seconds 40mb, 2356
files, 29045 commits
Great branching and merging.
Any workflow you want, you got it...
Shared repository
Blessed repository Linus Torvalds Lieutenants Developers
how toinstall
Linux: apt-get install git-core Mac OS X: brew install git
Windows: chocolatey install msysgit
Download from git-scm.com
getting started
git config --global user.name ... git config --global user.email ...
git init
master has no special meaning. It’s just a default branch.
git add
Staging area stores info about what will go into next
commit.
working directory staging area repository commit checkout the project stage
files
git commit
189f30b664981e4397625791c8ea3bbb5f2279a3 Commit “name” is a 40-digit SHA
commit 189f30b... tree e8455... parent(s) nil author Mindaugas... committer Mindaugas...
Initial commit
tree e8455... blob bc52a... README.md
blob bc52a...
SVN, CVS, Perforce store differences between commits.
Git stores snapshots.
commit0 commit1 commit2 tree0 tree1 tree2 blob A blob B
blob A blob A2 blob B2 blob B2
Basic training complete.
and pushing pulling
git remote add origin git@git...
git push origin master
git pull origin master
and merging branching
git branch name
Branch is a reference to the head of a line
of work.
C0 C1 master feature
git checkout name
git merge name
C0 master C1 C2 F1 F2 feature
C0 master C1 C2 F1 F2 feature C3
git rebase name
C0 master C1 C2 F1 F2 feature
C0 master F2 C2 C1 F1 feature
merge is fine, but in a lot of cases, rebase
is better.
Branching - too easy not to do
manipulating history
git commit --amend
git rebase --interactive
Interactive rebase lets you: reword, edit, squash, fixup, exec, remove
and reorder.
You can change history of remote repository with git push
--force. Be careful!
Rewriting history is fun and useful!
svn git-
git svn clone http://...
git svn rebase ~ svn update
git svn dcommit ~ svn commit
GitHub
The best way to collaborate.
More than 1.6 million people, 2.8 million repositories.
Used by individuals.
None
And organizations.
None
thoughts closing
blame bisect cherry-pick clean cvsimport describe diff fetch filter-branch grep
request-pull revert svnimport stash submodule tag and more...
git-scm.com gitready.com gitimmersion.com ontwik.com/category/git-github RESOURCES
Git != Subversion + Magic
The slogan of Subversion for a while was "CVS done
right". If you start with that kind of slogan, there's nowhere you can go. There is no way to do CVS right. Linus Torvalds
Zach Holman @holman thenounproject.com thanks to:
codingfearlessly.com twitter.com/mmozuras github.com/mmozuras thanks!