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
100
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Git and Hg
A comparison of commands and concepts in git and hg
David Newell
March 22, 2013
More Decks by David Newell
See All by David Newell
CoffeeScript Intro
rustedgrail
2
100
Other Decks in Programming
See All in Programming
Skillsは効率化、Agentsは"自分の拡張"——Builder時代のエージェント編成(CC Night 2026)
wemra
1
140
技術記事、 専門家としてのプログラマ、 言語化
mizchi
13
6.3k
Oxcを導入して開発体験が向上した話
yug1224
4
320
Developing with AI Agents — Codex, Claude Code & Cowork Practical Guide
x5gtrn
PRO
0
1.3k
DynamoDBには集計系のクエリがないけどなんとかしたい
musan
1
180
さぁV100、メモリをお食べ・・・
nilpe
0
150
Even G2とAWSで推しのエージェントを召喚しよう!
har1101
1
120
A2UI という光を覗いてみる
satohjohn
1
140
ECSアプリログをFireLensでコスト削減しようとしたけど諦めた話 in Fargate×Node.js
akihisaikeda
2
4.2k
コンテキストの使い捨てをやめる — ビジネスルール駆動開発と miko —
ioki
0
210
そのテスト、説明できますか?~LWテスト戦略FW~のご紹介
nakahara
0
160
Javaの型とAI時代に型が大事な理由 / java types and type in AI era
kishida
2
150
Featured
See All Featured
Six Lessons from altMBA
skipperchong
29
4.3k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
AI: The stuff that nobody shows you
jnunemaker
PRO
8
720
The Curious Case for Waylosing
cassininazir
1
400
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.9k
Speed Design
sergeychernyshev
33
1.9k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.2k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
71
40k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.3k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
560
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
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