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 and Hg
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
David Newell
March 22, 2013
Programming
1
94
Git and Hg
A comparison of commands and concepts in git and hg
David Newell
March 22, 2013
Tweet
Share
More Decks by David Newell
See All by David Newell
CoffeeScript Intro
rustedgrail
2
96
Other Decks in Programming
See All in Programming
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
1.1k
CSC307 Lecture 03
javiergs
PRO
1
490
Oxlint JS plugins
kazupon
1
880
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
430
Oxlintはいいぞ
yug1224
5
1.3k
Architectural Extensions
denyspoltorak
0
280
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
200
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
4
320
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.8k
生成AIを使ったコードレビューで定性的に品質カバー
chiilog
1
260
Apache Iceberg V3 and migration to V3
tomtanaka
0
160
360° Signals in Angular: Signal Forms with SignalStore & Resources @ngLondon 01/2026
manfredsteyer
PRO
0
120
Featured
See All Featured
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.6k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
170
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
140
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Technical Leadership for Architectural Decision Making
baasie
1
240
Between Models and Reality
mayunak
1
180
Accessibility Awareness
sabderemane
0
51
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.6k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
1
99
So, you think you're a good person
axbom
PRO
2
1.9k
Tell your own story through comics
letsgokoyo
1
810
ラッコキーワード サービス紹介資料
rakko
1
2.2M
Transcript
Hg and Git A Fair(ish) comparison
BitKeeper and BitMover Troubles Git - April 3rd, 2005 -
April 18th, 2005: First Merge - Linus Torvald Hg - April 19th, 2005 - Matt Mackall History
Git - Snapshots Hg - Changesets Git and Hg -
mix of both for compression Tracking Changes
Git cherry-pick - diff 2 files - apply changeset Hg
graft - apply changes to previous snapshots - for source and destination - apply changeset Cherry-picking and Grafting
Pulling changes git pull git fetch hg pull -u git
merge hg merge git commit git commit hg commit
git pull --rebase in .git/config [branch "master"] rebase = true
extension in hg Now without merging
Committing git add <file> hg pull -u git commit git
commit -a hg commit git pull git pull git push git push hg push
git stash git merge git stash pop Can add multiple
commits to stash hg shelve extension I don't want to commit everything
Shortcuts: Git and Hg <rev>^ (^<rev> is different) <rev>^ <rev1>..<rev2>
<rev2> - <rev1> (not <rev1>.. <rev2>) :/<some text> desc(<some text>) <ref>@{<a time>} date(<interval>)
git branch === hg bookmark hg branch !== git anything
hg has multiple heads - anonymous branches git detaches the head - must reattach to commit Branching
Both local Can be pushed remotely Can be pulled remotely
Can be named differently Really, your clone is on a local branch Git: Clone ~= Branch
git rebase staging git rebase --onto production staging <feature> git
merge staging git merge --abort git add git commit Merging a Git branch
hg merge staging hg update -C -r HEAD^ hg resolve
hg commit Rebase with extension Merging an Hg branch
Hg - checkout previous version - commit correction as new
head Git - checkout previous version - rewrite history to include correction I made a mistake
Hg - complete history - every merge logged Git -
clean history - linear history History
Why switch to bazaar http://doc.bazaar.canonical. com/migration/en/why-switch-to-bazaar. html#high-storage-efficiency-and-speed Speed
Git style branches hg bookmarks Start rebasing Git stash hg
shelve Recommendations