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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
Fluid Templating in TYPO3 14
s2b
0
130
AIによる開発の民主化を支える コンテキスト管理のこれまでとこれから
mulyu
3
280
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
7.4k
humanlayerのブログから学ぶ、良いCLAUDE.mdの書き方
tsukamoto1783
0
190
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
390
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
1.1k
CSC307 Lecture 04
javiergs
PRO
0
660
CSC307 Lecture 06
javiergs
PRO
0
690
Oxlint JS plugins
kazupon
1
950
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
190
AgentCoreとHuman in the Loop
har1101
5
240
Featured
See All Featured
sira's awesome portfolio website redesign presentation
elsirapls
0
150
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
110
Fireside Chat
paigeccino
41
3.8k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Everyday Curiosity
cassininazir
0
130
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.4k
How to make the Groovebox
asonas
2
1.9k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
66
37k
From π to Pie charts
rasagy
0
120
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
440
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