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
Mindaugas Mozūras
May 22, 2012
Programming
7
520
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
600
The Secret
mmozuras
0
290
Am I Still Productive?
mmozuras
0
450
The Three Last Conversations
mmozuras
0
390
Vinted Adventure
mmozuras
0
420
Frequent Releases & Major Changes
mmozuras
1
1k
Engineering for Engineering's Sake
mmozuras
1
1.5k
Life Embetterment With Hundreds of Deployments a Day
mmozuras
1
520
How to Build an Open Source Project in 3 Years
mmozuras
2
580
Other Decks in Programming
See All in Programming
Cursor Meetup Tokyo ゲノミクスとCursor: 進化と制約のあいだ
koido
2
710
推論された型の移植性エラーTS2742に挑む
teamlab
PRO
0
160
當開發遇上包裝:AI 如何讓產品從想法變成商品
clonn
0
2.8k
抽象データ型について学んだ
ryounasso
0
210
Feature Flag 自動お掃除のための TypeScript プログラム変換
azrsh
PRO
4
650
プロダクト改善のために新しいことを始める -useContextからの卒業、Zustandへ-
rebase_engineering
1
100
技術的負債と戦略的に戦わざるを得ない場合のオブザーバビリティ活用術 / Leveraging Observability When Strategically Dealing with Technical Debt
yoshiyoshifujii
0
170
try-catchを使わないエラーハンドリング!? PHPでResult型の考え方を取り入れてみよう
kajitack
3
390
Javaに鉄道指向プログラミング (Railway Oriented Pro gramming) のエッセンスを取り入れる/Bringing the Essence of Railway-Oriented Programming to Java
cocet33000
1
390
DevTalks 25 - Create your own AI-infused Java apps with ease
kdubois
2
130
RubyKaigi Hack Space in Tokyo & 函館最速 "予習" 会 / RubyKaigi Hack Space in Tokyo & The Fastest Briefing of RubyKaigi 2026 in Hakodate
moznion
1
130
#QiitaBash TDDでAIに設計イメージを伝える
ryosukedtomita
2
1.6k
Featured
See All Featured
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2.1k
Raft: Consensus for Rubyists
vanstee
137
7k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
1
91
Into the Great Unknown - MozCon
thekraken
39
1.8k
RailsConf 2023
tenderlove
30
1.1k
A Tale of Four Properties
chriscoyier
159
23k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3k
Building a Modern Day E-commerce SEO Strategy
aleyda
40
7.3k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Navigating Team Friction
lara
186
15k
Code Review Best Practice
trishagee
68
18k
Art, The Web, and Tiny UX
lynnandtonic
298
21k
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!