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
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Mindaugas Mozūras
March 21, 2012
Programming
17
4.9k
git
Introduction to Git. A presentation I gave at local user-groups.
Mindaugas Mozūras
March 21, 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
15年目のiOSアプリを1から作り直す技術
teakun
1
610
encoding/json/v2のUnmarshalはこう変わった:内部実装で見る設計改善
kurakura0916
0
350
Ruby x Terminal
a_matsuda
7
590
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
410
Go Conference mini in Sendai 2026 : Goに新機能を提案し実装されるまでのフロー徹底解説
yamatoya
0
530
今更考える「単一責任原則」 / Thinking about the Single Responsibility Principle
tooppoo
3
1.5k
手戻りゼロ? Spec Driven Developmentとは@KAG AI week
tmhirai
1
170
20260228_JAWS_Beginner_Kansai
takuyay0ne
5
460
猫の手も借りたい!ので AIエージェント猫を作って社内に放した話 Claude Code × Container Lambda の Slack Bot "DevNeko"
naramomi7
0
250
米国のサイバーセキュリティタイムラインと見る Goの暗号パッケージの進化
tomtwinkle
2
460
SourceGeneratorのマーカー属性問題について
htkym
0
170
AIに任せる範囲を安全に広げるためにやっていること
fukucheee
0
110
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
400
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.5k
Why Our Code Smells
bkeepers
PRO
340
58k
Into the Great Unknown - MozCon
thekraken
40
2.3k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
620
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
760
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.1k
Mind Mapping
helmedeiros
PRO
1
110
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
140
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
67
37k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
80
Transcript
git or: how I learned to stop worrying and love
source control
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
everyone uses git
14% 29% 55% GitHub SourceForge Google Code CodePlex Total number
of commits 2011.01 - 2011.05
automapper backbone bootstrap cassandra coffeescript couchdb cucumber fluent-nhibernate git jekyll
less linux modernizr mongodb mono nancy ninject node nservicebus rails ravendb reddit
how toinstall
Linux: apt-get install git-core Mac OS X: brew install git
Windows: chocolatey install msysgit
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 --all
git commit
189f30b664981e4397625791c8ea3bbb5f2279a3 Commit “name” is a 40-digit SHA
There are four types of objects: tag, commit, tree and
blob.
git remote add origin git@git...
git push origin master
HEAD is a reference to the last commit in the
current branch.
git pull origin master
Basic training complete.
and history branching
git branch name
Branch is a reference to the head of a line
of work.
git checkout name
git merge name
git reset --hard commit
git rebase name
merge is fine, but in a lot of cases, rebase
is better.
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.
~1.5 million people, ~2.5 million repositories.
Phil Haack, Adam Roben, Paul Betts are GitHubbers
github.com/Haacked/SeeGit GitHub for Windows...?
thoughts closing
blame bisect cherry-pick clean cvsimport describe diff fetch filter-branch grep
request-pull revert svnimport stash submodule tag and more...
progit.org gitready.com gitimmersion.com ontwik.com/category/git-github RESOURCES
https://git.wiki.kernel.org/articles/i/n/t/ Interfaces,_frontends,_and_tools.html TortoiseGit Git Extensions Git Source Control Provider TOOLS
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:
twitter.com/mmozuras github.com/mmozuras thanks!