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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Ran Tavory
September 07, 2014
Programming
210
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Git for SVN users, Tech talk week @ outbrain
Ran Tavory
September 07, 2014
More Decks by Ran Tavory
See All by Ran Tavory
go-grpc-channelz: a Go based UI for gRPC's channelz
rantav
0
670
Code Review (Navy Hackathon)
rantav
0
130
Infrastructure Testing Using Kubernetes And Golang
rantav
0
130
Infrastructure testing using Kubernetes
rantav
0
620
Interview Workshop - Technical Questions
rantav
0
390
Code Review Best Practices
rantav
0
140
Code Review @ AppsFlyer
rantav
0
120
GraphQL at Yodas
rantav
2
200
Git for champs
rantav
0
190
Other Decks in Programming
See All in Programming
数年滞っていたダークモード対応をおよそ2週間で完了させる
chigichan24
0
200
自動化したのに回らない テスト運用の壁―AI時代の品質責任と生産性
mfunaki
0
570
Webエンジニアなのにブラウザの仕組みがわからないので、Pythonで自作してみた
tatsuki12
4
1.6k
PyO3 で既存 Python 評価器を Rust core 化する ー wasm-bindgen でブラウザにも配るための設計
kdash
1
160
ALB ログから Trace を気合で繋げる技術
fohte
7
840
まだ間に合う!今年の夏こそSchemeのマクロ展開器を完全理解!
omasanori
0
600
AIを上手に使っていこうとしたら越境せざるを得なくなった話 〜実践1年で見えた境界を越えなければならない理由と進め方〜 / Crossing borders with AI
tomoyakitaura
2
920
Jindong: Introducing Declarative Haptics in Compose Multiplatform
l2hyunwoo
0
140
仕様駆動開発の消費期限
watany
20
9.2k
Cloudflare is Agents
chimame
0
190
異なる設計思想のフレームワークを経験して得た学び
amekuhideki
2
1.4k
レビュー履歴をAIに食わせて、 Compose移行を加速するs
shihochan
0
260
Featured
See All Featured
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
The Mindset for Success: Future Career Progression
greggifford
PRO
0
490
Docker and Python
trallard
47
4.2k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
BBQ
matthewcrist
89
10k
What does AI have to do with Human Rights?
axbom
PRO
1
2.3k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.9k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
570
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Done Done
chrislema
186
16k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
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 “
[email protected]
” 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)