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
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
580
The Secret
mmozuras
0
280
Am I Still Productive?
mmozuras
0
440
The Three Last Conversations
mmozuras
0
380
Vinted Adventure
mmozuras
0
410
Frequent Releases & Major Changes
mmozuras
1
890
Engineering for Engineering's Sake
mmozuras
1
1.3k
Life Embetterment With Hundreds of Deployments a Day
mmozuras
1
510
How to Build an Open Source Project in 3 Years
mmozuras
2
570
Other Decks in Programming
See All in Programming
Formの複雑さに立ち向かう
bmthd
1
720
昭和の職場からアジャイルの世界へ
kumagoro95
1
350
Djangoアプリケーション 運用のリアル 〜問題発生から可視化、最適化への道〜 #pyconshizu
kashewnuts
1
230
iOSエンジニアから始める visionOS アプリ開発
nao_randd
3
120
Grafana Cloudとソラカメ
devoc
0
140
Kubernetes History Inspector(KHI)を触ってみた
bells17
0
200
chibiccをCILに移植した結果 (NGK2025S版)
kekyo
PRO
0
210
Lottieアニメーションをカスタマイズしてみた
tahia910
0
120
Rails アプリ地図考 Flush Cut
makicamel
1
110
知られざるDMMデータエンジニアの生態 〜かつてツチノコと呼ばれし者〜
takaha4k
4
1.3k
Pulsar2 を雰囲気で使ってみよう
anoken
0
230
CI改善もDatadogとともに
taumu
0
110
Featured
See All Featured
It's Worth the Effort
3n
184
28k
The Cult of Friendly URLs
andyhume
78
6.2k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
27
1.9k
Six Lessons from altMBA
skipperchong
27
3.6k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Fashionably flexible responsive web design (full day workshop)
malarkey
406
66k
The Language of Interfaces
destraynor
156
24k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
20
2.4k
Bash Introduction
62gerente
610
210k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
29
4.6k
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!