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
180
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
開源公益專案能賺錢嗎?
denkeni
0
250
Unpredictable Sandbox Environment for IAP Auto-renewable Subscriptions
denkeni
0
540
IAP @ iPlayground 2020
denkeni
1
370
iOS 11 MapKit Annotation Clustering
denkeni
0
160
JavaScript: Basic rules for avoiding strange issues
denkeni
0
130
資訊科技的未來與展望(2014/01)
denkeni
0
180
Other Decks in Programming
See All in Programming
PHPでOfficeファイルを取り扱う! PHP Officeライブラリを プロダクトに組み込んだ話
hirobe1999
0
840
Introduction for Open Source Swift Workshop
giginet
PRO
0
180
Enhancing Applications with Accessibility API
kishikawakatsumi
3
890
イベントストーミングによるオブジェクトモデリング・オブジェクト指向プログラミングの適用・開発プロセスの変遷・アーキテクチャの変革 / Object modeling with Event Storming.
nrslib
12
3k
C# 大統一理論推進委員会 会員のための Unity Package Manager プロジェクト構成案
monry
PRO
0
580
ISUCONってなんだか難しそう……!!でも、初めてのISUCONにPHPで挑戦してきました!
kotomin_m
1
300
プロンプトエンジニアリング入門
tomokusaba
2
970
DocC Tutorial と TCA におけるテスト機能の紹介
kalupas226
1
330
コミュニティに参加したことで起きた変化
ohmori_yusuke
3
130
CSRF対策のやり方、そろそろアップデートしませんか / Update your knowledge of CSRF protection
hiro_y
25
14k
Material 3で Material 2ぽい見た目にする
numeroanddev
2
250
Understanding Ast By Looking
inouehi
0
120
Featured
See All Featured
Building Effective Engineering Teams - LeadDev
addyosmani
25
1.8k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
272
12k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
111
35k
Scaling GitHub
holman
456
140k
Debugging Ruby Performance
tmm1
68
11k
We Have a Design System, Now What?
morganepeng
42
6.7k
The Art of Programming - Codeland 2020
erikaheidi
40
12k
WebSockets: Embracing the real-time Web
robhawkes
59
6.9k
Code Review Best Practice
trishagee
54
15k
Design by the Numbers
sachag
274
18k
The World Runs on Bad Software
bkeepers
PRO
60
6.6k
The Invisible Side of Design
smashingmag
293
49k
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