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
250
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
16
Who Owns Your Digital Identity 誰掌握你的數位身分?
denkeni
0
51
開放文化與資安管理的邊界
denkeni
0
92
開源公益專案能賺錢嗎?
denkeni
0
420
Unpredictable Sandbox Environment for IAP Auto-renewable Subscriptions
denkeni
0
630
IAP @ iPlayground 2020
denkeni
1
420
iOS 11 MapKit Annotation Clustering
denkeni
0
210
JavaScript: Basic rules for avoiding strange issues
denkeni
0
170
資訊科技的未來與展望(2014/01)
denkeni
0
290
Other Decks in Programming
See All in Programming
Rails産でないDBを Railsに引っ越すHACK - Omotesando.rb #110
lnit
1
150
実践ArchUnit ~実例による検証パターンの紹介~
ogiwarat
2
220
Blueskyのプラグインを作ってみた
hakkadaikon
1
430
OpenNext + Hono on Cloudflare でイマドキWeb開発スタックを実現する
rokuosan
0
110
単体テストの始め方/作り方
toms74209200
0
360
ドメインモデリングにおける抽象の役割、tagless-finalによるDSL構築、そして型安全な最適化
knih
9
1.5k
SODA - FACT BOOK
sodainc
1
440
AIエージェントによるテストフレームワーク Arbigent
takahirom
0
350
Perplexity Slack Botを作ってAI活用を進めた話 / AI Engineering Summit プレイベント
n3xem
0
540
Zennの運営完全に理解した #完全に理解したTalk
wadayusuke
1
180
eBPFを用いたAIネットワーク監視システム論文の実装 / eBPF Japan Meetup #4
yuukit
3
720
UPDATEがシステムを複雑にする? イミュータブルデータモデルのすすめ
shimomura
0
500
Featured
See All Featured
Side Projects
sachag
454
42k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.6k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
228
22k
Writing Fast Ruby
sferik
628
61k
Intergalactic Javascript Robots from Outer Space
tanoku
271
27k
Code Reviewing Like a Champion
maltzj
524
40k
Fireside Chat
paigeccino
37
3.5k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
6
670
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Documentation Writing (for coders)
carmenintech
71
4.8k
KATA
mclloyd
29
14k
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