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
210
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
60
開源公益專案能賺錢嗎?
denkeni
0
350
Unpredictable Sandbox Environment for IAP Auto-renewable Subscriptions
denkeni
0
590
IAP @ iPlayground 2020
denkeni
1
400
iOS 11 MapKit Annotation Clustering
denkeni
0
190
JavaScript: Basic rules for avoiding strange issues
denkeni
0
150
資訊科技的未來與展望(2014/01)
denkeni
0
240
Other Decks in Programming
See All in Programming
API Platform for Laravel
dunglas
1
450
rbs-inlineを導入してYARDからRBSに移行する
euglena1215
1
290
Some more adventure of Happy Eyeballs
coe401_
2
190
unique パッケージから学ぶ interning と weak reference @ Asakusa.go#3
karamaru
2
810
メモリ最適化を究める!iOSアプリ開発における5つの重要なポイント
yhirakawa333
0
420
Amazon BedrockでサーバレスなAIお料理ボットを作成する!!
tosuri13
0
230
長期運用プロダクトの開発速度を維持し続けるためのリファクタリング実践例
wataruss
8
2.7k
私のEbitengineの第一歩
qt_luigi
0
450
2024 컴포즈 정원사
jisungbin
0
150
Swiftコードバトル必勝法
toshi0383
0
170
Shinjuku.rb#95:心の技術書紹介
free_world21
1
110
KSPの導入・移行を前向きに検討しよう!
shxun6934
PRO
0
280
Featured
See All Featured
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Web Components: a chance to create the future
zenorocha
309
42k
Faster Mobile Websites
deanohume
304
30k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
123
18k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
8.9k
No one is an island. Learnings from fostering a developers community.
thoeni
18
2.9k
Documentation Writing (for coders)
carmenintech
65
4.3k
Statistics for Hackers
jakevdp
794
220k
What the flash - Photography Introduction
edds
67
11k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
How GitHub (no longer) Works
holman
310
140k
Mobile First: as difficult as doing things right
swwweet
221
8.8k
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