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
atomic commits
Search
Kai Howelmeyer
January 21, 2014
Research
0
93
atomic commits
Kai Howelmeyer
January 21, 2014
Tweet
Share
More Decks by Kai Howelmeyer
See All by Kai Howelmeyer
git tricks
kaihowl
3
140
git intro by mkilling
kaihowl
1
82
Other Decks in Research
See All in Research
Pythonでジオを使い倒そう! 〜それとFOSS4G Hiroshima 2026のご紹介を少し〜
wata909
0
1.3k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
66
36k
存立危機事態の再検討
jimboken
0
240
製造業主導型経済からサービス経済化における中間層形成メカニズムのパラダイムシフト
yamotty
0
480
Thirty Years of Progress in Speech Synthesis: A Personal Perspective on the Past, Present, and Future
ktokuda
0
160
Attaques quantiques sur Bitcoin : comment se protéger ?
rlifchitz
0
140
ドメイン知識がない領域での自然言語処理の始め方
hargon24
1
240
[Devfest Incheon 2025] 모두를 위한 친절한 언어모델(LLM) 학습 가이드
beomi
2
1.4k
AIスパコン「さくらONE」の オブザーバビリティ / Observability for AI Supercomputer SAKURAONE
yuukit
2
1.1k
都市交通マスタープランとその後への期待@熊本商工会議所・熊本経済同友会
trafficbrain
0
120
音声感情認識技術の進展と展望
nagase
0
460
AI Agentの精度改善に見るML開発との共通点 / commonalities in accuracy improvements in agentic era
shimacos
4
1.2k
Featured
See All Featured
Side Projects
sachag
455
43k
The Cost Of JavaScript in 2023
addyosmani
55
9.5k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
320
New Earth Scene 8
popppiees
1
1.5k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.6k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
180
The Invisible Side of Design
smashingmag
302
51k
Thoughts on Productivity
jonyablonski
74
5k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
440
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
Marketing to machines
jonoalderson
1
4.6k
A Tale of Four Properties
chriscoyier
162
24k
Transcript
atomic commits Kai Höwelmeyer @kaihowl git aficionados meetup 01/21/14
atomic commit A commit only containing changes that logically belong
together and cannot be split up any further without breaking the intent of the commit.
Keep the history clean. Convey intent. Don’t repeat the diff.
Features are seldom straight- forward. But your commits should be!
Dissect your feature into: Necessary changes & the actual feature
implementation
But how?
Commit early and often on a feature branch. It works
Fixed a typo Added a test Refactored a li6le Added another part Improved performance
When done, git merge -‐-‐squash on master
Master Commit 1 Master Commit 2 … Master Commit n Our enBre feature staged
Now git reset
Then git add -‐p Only choose hunks that belong
into one atomic commit. Master Commit 1 Master Commit 2 … Master Commit n Remainder unstaged Atomic Commit 1 staged
Check with git diff -‐-‐staged
Master Commit 1 Master Commit 2 … Master Commit n Remainder unstaged Atomic Commit 1 staged
Commit with meaningful message. Master Commit 1 …
Master Commit n Atomic Commit 1 Remainder unstaged
git stash -‐u Leaves clean working copy. Check integrity
of system. Master Commit 1 … Master Commit n Atomic Commit 1 Remainder stashed
git stash pop Stage next atomic commit with git
add -‐p Master Commit 1 … Master Commit n Atomic Commit 1 Remainder unstaged Atomic Commit 2 staged
Final check git diff ..feature-‐branch Did I commit
everything?
Next time Determine code ownership w/ log & blame -
or - How I fell in love with vim-fugitive
@kaihowl
Image Sources • http://www.flickr.com/photos/lij/ 122525716/sizes/l/ • http://www.flickr.com/photos/ diorama_sky/4557914779/sizes/l/ • http://www.flickr.com/photos/
camknows/3821001012/