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
79
atomic commits
Kai Howelmeyer
January 21, 2014
Tweet
Share
More Decks by Kai Howelmeyer
See All by Kai Howelmeyer
git tricks
kaihowl
3
130
git intro by mkilling
kaihowl
1
72
Other Decks in Research
See All in Research
VectorLLM: Human-like Extraction of Structured Building Contours via Multimodal LLMs
satai
4
340
Adaptive Experimental Design for Efficient Average Treatment Effect Estimation and Treatment Choice
masakat0
0
130
Stealing LUKS Keys via TPM and UUID Spoofing in 10 Minutes - BSides 2025
anykeyshik
0
140
J-RAGBench: 日本語RAGにおける Generator評価ベンチマークの構築
koki_itai
0
800
CoRL2025速報
rpc
1
2.2k
投資戦略202508
pw
0
570
PhD Defense 2025: Visual Understanding of Human Hands in Interactions
tkhkaeio
1
260
MetaEarth: A Generative Foundation Model for Global-Scale Remote Sensing Image Generation
satai
4
330
心理言語学の視点から再考する言語モデルの学習過程
chemical_tree
2
630
[CV勉強会@関東 CVPR2025] VLM自動運転model S4-Driver
shinkyoto
2
540
問いを起点に、社会と共鳴する知を育む場へ
matsumoto_r
PRO
0
660
Sat2City:3D City Generation from A Single Satellite Image with Cascaded Latent Diffusion
satai
3
150
Featured
See All Featured
Scaling GitHub
holman
463
140k
Art, The Web, and Tiny UX
lynnandtonic
303
21k
Producing Creativity
orderedlist
PRO
347
40k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.5k
A Modern Web Designer's Workflow
chriscoyier
697
190k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.7k
How STYLIGHT went responsive
nonsquared
100
5.8k
Building Applications with DynamoDB
mza
96
6.7k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
The Invisible Side of Design
smashingmag
302
51k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Site-Speed That Sticks
csswizardry
13
920
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/