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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Kai Howelmeyer
January 21, 2014
Research
0
95
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
83
Other Decks in Research
See All in Research
Agentic AI フレームワーク戦略白書 (2025年度版)
mickey_kubo
1
130
The mathematics of transformers
gpeyre
0
110
FUSE-RSVLM: Feature Fusion Vision-Language Model for Remote Sensing
satai
3
190
財務諸表監査のための逐次検定
masakat0
1
270
COFFEE-Japan PROJECT Impact Report(海ノ向こうコーヒー)
ontheslope
0
890
[SITA2025 Workshop] 空中計算による高速・低遅延な分散回帰分析
k_sato
0
110
病院向け生成AIプロダクト開発の実践と課題
hagino3000
0
570
Attaques quantiques sur Bitcoin : comment se protéger ?
rlifchitz
0
160
An Open and Reproducible Deep Research Agent for Long-Form Question Answering
ikuyamada
0
340
LLMアプリケーションの透明性について
fufufukakaka
0
190
20年前に50代だった人たちの今
hysmrk
0
160
R&Dチームを起ち上げる
shibuiwilliam
1
190
Featured
See All Featured
A Tale of Four Properties
chriscoyier
163
24k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
230
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
470
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Navigating Team Friction
lara
192
16k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
150
Optimizing for Happiness
mojombo
378
71k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
180
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Navigating Weather and Climate Data
rabernat
0
130
Typedesign – Prime Four
hannesfritz
42
3k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
220
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/