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 for SVN users, Tech talk week @ outbrain
Search
Ran Tavory
September 07, 2014
Programming
2
180
Git for SVN users, Tech talk week @ outbrain
Ran Tavory
September 07, 2014
Tweet
Share
More Decks by Ran Tavory
See All by Ran Tavory
go-grpc-channelz: a Go based UI for gRPC's channelz
rantav
0
520
Code Review (Navy Hackathon)
rantav
0
52
Infrastructure Testing Using Kubernetes And Golang
rantav
0
63
Infrastructure testing using Kubernetes
rantav
0
500
Interview Workshop - Technical Questions
rantav
0
310
Code Review Best Practices
rantav
0
66
Code Review @ AppsFlyer
rantav
0
63
GraphQL at Yodas
rantav
2
170
Git for champs
rantav
0
140
Other Decks in Programming
See All in Programming
Lambdaの監視、できてますか?Datadogを用いてLambdaを見守ろう
nealle
2
750
Djangoにおける複数ユーザー種別認証の設計アプローチ@DjangoCongress JP 2025
delhi09
PRO
4
510
PHPカンファレンス名古屋2025 タスク分解の試行錯誤〜レビュー負荷を下げるために〜
soichi
1
740
お前もAI鬼にならないか?👹Bolt & Cursor & Supabase & Vercelで人間をやめるぞ、ジョジョー!👺
taishiyade
7
4.2k
CloudNativePGを布教したい
nnaka2992
0
120
CloudRun, Spanner に対する負荷試験の反省と オブザーバビリティによるアプローチ
oyasumipants
1
160
Swift Testingのモチベを上げたい
stoticdev
2
200
推しメソッドsource_locationのしくみを探る - はじめてRubyのコードを読んでみた
nobu09
2
360
機能が複雑化しても 頼りになる FactoryBotの話
tamikof
1
240
[JAWS DAYS 2025] 最近の DB の競合解決の仕組みが分かった気になってみた
maroon1st
0
170
Jakarta EE meets AI
ivargrimstad
0
680
The Clean ArchitectureがWebフロントエンドでしっくりこないのは何故か / Why The Clean Architecture does not fit with Web Frontend
twada
PRO
56
17k
Featured
See All Featured
Fontdeck: Realign not Redesign
paulrobertlloyd
83
5.4k
GraphQLとの向き合い方2022年版
quramy
44
14k
Fireside Chat
paigeccino
35
3.2k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Rebuilding a faster, lazier Slack
samanthasiow
80
8.9k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Why Our Code Smells
bkeepers
PRO
336
57k
Done Done
chrislema
182
16k
Being A Developer After 40
akosma
89
590k
Statistics for Hackers
jakevdp
797
220k
Typedesign – Prime Four
hannesfritz
41
2.5k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
100
18k
Transcript
Git Introduction For Subversion Users Ran Tavory Attributed to Totango
Who am I • A Developer, of course… • Migrated
two teams from SVN to Git • Gormim
None
Why git?
Why Git? • IT IS BETTER. There’s a site for
that.
Git is a File System
All (most) Operations are Local and Fast! • Commit •
Log (view history) • Diff • ...
Git is Distributed
Git is Fast
Lightweight (and local) Branching
Data Integrity
Staging Area
Stash Area
None
Setup
Git Setup $ brew install git! $ git config --global
user.name “Ran Tavory”! $ git config --global user.email “rantav@gmail.com” https://gist.github.com/rantav/ 5d6fb14057f062ecbc70
GitHub Setup https://help.github.com/articles/ set-up-git
Clone the Repo $git clone https://github.com/ rantav/devdev.git
The Basics
git status
git add
git diff
git diff More here: http://www.gitguys.com/topics/git-diff/
git commit
git commit --amend
git checkout
git rm
git mv
git log
git log -p
git log --word-diff
git log --stat
git log hacking
git remote
git pull
To rebase or not to rebase? • Prefer rebase •
this keeps the commit log cleaner •git pl! • Sometimes an actual merge is needed • So don’t rebase • For example, when merging branches
git push
SVN Parallels
Git for SVN
Git for SVN
Git for SVN
Git Lifecycle
Git Lifecycle
The Staging Area (AKA The Index)
Branching
Text http://pcottle.github.io/learnGitBranching/?demo A cool demo
Branching
Branching
Branching - Merging (fast forward)
Branching - Deleting
Branching cont
Branching - Merging (3 way merge)
Branching - Management
Branching - Remote
Branching - Remote
Branching - Remote
Branching - Remote git pull == git fetch && git
merge
Branching - Pushing Requires tracking
Deleting Remote Branches
Pull Requests
Creating a Pull Request 1 2 3 4
Reviewing a Pull Request
Merging Pull Request Online
Merging Pull Requests Offline •Resolve Conflicts •Test •Improve
Deleting Branch After PR Merge
Git Flow
None
1. Create a Branch git co -b bug-157 Branch Naming:
bug-xxx! feature-yyy! wip-zzz
2. Add Commits Commit messages are super important!!!
3. Open a Pull Request Make sure you assign a
reviewer!
4. Discuss AKA Code Review Continue to commit and push.
This will be reflected
5. Merge Merge means: It’s good for production. master is
always deployable
Pull Request Demo
Code Review
Code Review
Protips
Protip: How to transition your team from svn to git
1. Use git-svn, or Svn2git 2. Start using git “as svn” eg no branches 3. Start using branches and pull requests (if github) 4. Personal opinion: Use only CLI tools
Protip: git rebase -i
Protip: zsh integration
Protip: git stash
Extra
Conflicts
Conflicts Edit Collision # Edit file and then $ git
add! $ git commit
Conflicts Removed File
Conflicts Removed File - Keep
Conflicts Removed File - Remove
Conflicts Git Mergtool • Not covered here... • http://git-scm.com/docs/git-mergetool
Conflicts While Rebasing
Learning More
Refs http://git-scm.com/about http://thkoch2001.github.io/whygitisbetter/ http://www.slideshare.net/manishchaks/subversion- to-git-migration http://www.git-tower.com/blog/git-for-subversion- users-cheat-sheet-detail/ http://git.or.cz/course/svn.html (or: where
did I steal from?)
Refs https://help.github.com/articles/resolving-a-merge-conflict- from-the-command-line http://pcottle.github.io/learnGitBranching/ http://jeffkreeftmeijer.com/2010/the-magical-and-not- harmful-rebase/ https://help.github.com/articles/using-pull-requests https://help.github.com/articles/creating-a-pull-request http://en.wikipedia.org/wiki/ Coupling_(computer_programming)