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
AIで開発はどれくらい加速したのか?AIエージェントによるコード生成を、現場の評価と研究開発の評価の両面からdeep diveしてみる
daisuketakeda
1
2.4k
Basic Architectures
denyspoltorak
0
670
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.4k
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
140
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
CSC307 Lecture 09
javiergs
PRO
1
830
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
450
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
7.4k
AIによる高速開発をどう制御するか? ガードレール設置で開発速度と品質を両立させたチームの事例
tonkotsuboy_com
7
2.3k
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
170
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
140
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
6
1.8k
Featured
See All Featured
Ethics towards AI in product and experience design
skipperchong
2
190
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
320
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
51
The agentic SEO stack - context over prompts
schlessera
0
630
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
110
The Limits of Empathy - UXLibs8
cassininazir
1
210
Designing for humans not robots
tammielis
254
26k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.2k
What's in a price? How to price your products and services
michaelherold
247
13k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.9k
Building AI with AI
inesmontani
PRO
1
690
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