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
260
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
Defensive Security
denkeni
0
21
Who Owns Your Digital Identity 誰掌握你的數位身分?
denkeni
0
66
開放文化與資安管理的邊界
denkeni
0
94
開源公益專案能賺錢嗎?
denkeni
0
420
Unpredictable Sandbox Environment for IAP Auto-renewable Subscriptions
denkeni
0
640
IAP @ iPlayground 2020
denkeni
1
430
iOS 11 MapKit Annotation Clustering
denkeni
0
210
JavaScript: Basic rules for avoiding strange issues
denkeni
0
170
資訊科技的未來與展望(2014/01)
denkeni
0
300
Other Decks in Programming
See All in Programming
Webの外へ飛び出せ NativePHPが切り拓くPHPの未来
takuyakatsusa
2
450
エンジニア向け採用ピッチ資料
inusan
0
170
#QiitaBash MCPのセキュリティ
ryosukedtomita
0
350
Node-RED を(HTTP で)つなげる MCP サーバーを作ってみた
highu
0
110
エラーって何種類あるの?
kajitack
5
320
#kanrk08 / 公開版 PicoRubyとマイコンでの自作トレーニング計測装置を用いたワークアウトの理想と現実
bash0c7
1
640
PostgreSQLのRow Level SecurityをPHPのORMで扱う Eloquent vs Doctrine #phpcon #track2
77web
2
410
Systèmes distribués, pour le meilleur et pour le pire - BreizhCamp 2025 - Conférence
slecache
0
110
プロダクト志向ってなんなんだろうね
righttouch
PRO
0
170
関数型まつりレポート for JuliaTokai #22
antimon2
0
160
たった 1 枚の PHP ファイルで実装する MCP サーバ / MCP Server with Vanilla PHP
okashoi
1
210
Rubyでやりたい駆動開発 / Ruby driven development
chobishiba
1
490
Featured
See All Featured
4 Signs Your Business is Dying
shpigford
184
22k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3.1k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
940
Build The Right Thing And Hit Your Dates
maggiecrowley
36
2.8k
Side Projects
sachag
455
42k
A designer walks into a library…
pauljervisheath
207
24k
Become a Pro
speakerdeck
PRO
28
5.4k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
22k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.7k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.3k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
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