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 vs SVN
Search
denkeni
March 12, 2015
Programming
0
230
Git vs SVN
A Git introduction for SVN users. Including bidirectional bridge Git-Svn.
denkeni
March 12, 2015
Tweet
Share
More Decks by denkeni
See All by denkeni
Who Owns Your Digital Identity 誰掌握你的數位身分?
denkeni
0
16
開放文化與資安管理的邊界
denkeni
0
71
開源公益專案能賺錢嗎?
denkeni
0
380
Unpredictable Sandbox Environment for IAP Auto-renewable Subscriptions
denkeni
0
610
IAP @ iPlayground 2020
denkeni
1
410
iOS 11 MapKit Annotation Clustering
denkeni
0
190
JavaScript: Basic rules for avoiding strange issues
denkeni
0
150
資訊科技的未來與展望(2014/01)
denkeni
0
260
Other Decks in Programming
See All in Programming
Haze - Real time background blurring
chrisbanes
1
510
モバイルアプリにおける自動テストの導入戦略
ostk0069
0
110
ドメインイベント増えすぎ問題
h0r15h0
1
230
20年もののレガシープロダクトに 0からPHPStanを入れるまで / phpcon2024
hirobe1999
0
410
fs2-io を試してたらバグを見つけて直した話
chencmd
0
230
今からはじめるAndroidアプリ開発 2024 / DevFest 2024
star_zero
0
1k
create_tableをしただけなのに〜囚われのuuid編〜
daisukeshinoku
0
240
急成長期の品質とスピードを両立するフロントエンド技術基盤
soarteclab
0
930
命名をリントする
chiroruxx
1
390
複雑な仕様に立ち向かうアーキテクチャ
myohei
0
170
선언형 UI에서의 상태관리
l2hyunwoo
0
150
ソフトウェアの振る舞いに着目し 複雑な要件の開発に立ち向かう
rickyban
0
890
Featured
See All Featured
Docker and Python
trallard
42
3.1k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.4k
KATA
mclloyd
29
14k
Visualization
eitanlees
146
15k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
127
18k
YesSQL, Process and Tooling at Scale
rocio
169
14k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
48
2.2k
Adopting Sorbet at Scale
ufuk
73
9.1k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
28
2.1k
Transcript
Git vs SVN @denkeni
Git - first impressions • Distributed Version Control System •
Created by Linus Torvalds for Linux kernel project management. • Fast, lightweight. • GitHub • "Local branching on the cheap"
But git is more complex and requires more management than
svn, definitely.
Git SVN git clone svn checkout git checkout xxx.m svn
revert xxx.m git checkout $branch_name svn switch $branch_url git checkout $commit svn merge -r301:300 xxx.m svn commit git reset --hard HEAD svn revert -R . git pull (= git fetch + git merge) svn update git revert $commit -
Remote-dependent(SVN) vs Local-Remote(Git)
Uncommitted (Local) Committed (Remote) svn commit
Uncommitted (Local) Committed (Remote) svn commit Working space/directory Index /
Staging area Local repository Remote repository git add xxx.m git commit git push
A typical case of SVN One trunk development
svn update (solve conflicts) svn commit trunk Remote Local
Remote Local trunk
A typical case of git Branch merging development
master Remote Local master git branch $branch_name git checkout $branch_name
Remote Local master branch git commit master
Remote Local master git checkout master branch master
Remote Local master git merge $branch_name git push branch master
(other people pushed something)
Remote Local master branch master
(Git-SVN: Use Git client for SVN remote repository) My Git-SVN
Flow
trunk master Remote Local
Remote Local master trunk branch
Remote Local master trunk git svn rebase (≈git pull) (≈svn
update) branch
Remote Local trunk branch master
Remote Local trunk master git rebase master (solve conflicts) branch
Remote Local trunk master branch
Remote Local trunk master git rebase master -i (solve conflicts)
(squash commits into one) branch
Remote Local trunk master branch
Remote Local trunk master branch git merge branch
Remote Local trunk branch master
Remote Local trunk master git svn dcommit (≈git push) branch
Remote Local trunk master branch
"A successful Git branching model." Git Flow
None
None
Learning Resources • 《Pro Git》by Scott Chacon(範例多易學,有中文版) http://git-scm.com/book/ • Try
Git: Code School(線上學 Git 指令) https://try.github.io/ • ihower 的《Git版本控制系統》 http://ihower.tw/git/ • Will 保哥的《30 天精通 Git 版本控管》(深入淺出) https://github.com/doggy8088/Learn-Git-in-30-days • GitSvnComparison https://git.wiki.kernel.org/index.php/GitSvnComparsion • Tech Talk: Linus Torvalds on git http://youtu.be/4XpnKHJAok8