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
110
0
Share
atomic commits
Kai Howelmeyer
January 21, 2014
More Decks by Kai Howelmeyer
See All by Kai Howelmeyer
git tricks
kaihowl
3
140
git intro by mkilling
kaihowl
1
91
Other Decks in Research
See All in Research
【SIGGRAPH Asia 2025】Lo-Fi Photograph with Lo-Fi Communication
toremolo72
0
160
東京大学工学部計数工学科、計数工学特別講義の説明資料
kikuzo
0
390
FUSE-RSVLM: Feature Fusion Vision-Language Model for Remote Sensing
satai
3
700
LLMアプリケーションの透明性について
fufufukakaka
0
220
AIエージェント時代のLLM-jpモデルのあるべき姿
k141303
0
350
Harness Engineering and Al Agent
kzinmr
0
510
存立危機事態の再検討
jimboken
0
280
英語教育 “研究” のあり方:学術知とアウトリーチの緊張関係
terasawat
1
950
COFFEE-Japan PROJECT Impact Report(海ノ向こうコーヒー)
ontheslope
0
1.6k
量子コンピュータの紹介
oqtopus
0
300
オーストリア流 都市の公共交通サービス水準評価@公共交通オープンデータ最前線2026
trafficbrain
0
150
さくらインターネット研究所テックトーク2026春、研究開発Gr.25年度成果26年度方針
kikuzo
0
140
Featured
See All Featured
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
190
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4k
The Invisible Side of Design
smashingmag
302
52k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
210
4 Signs Your Business is Dying
shpigford
187
22k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
360
Building Applications with DynamoDB
mza
96
7k
The agentic SEO stack - context over prompts
schlessera
0
780
Utilizing Notion as your number one productivity tool
mfonobong
4
300
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.1k
Why Our Code Smells
bkeepers
PRO
340
58k
Visualization
eitanlees
151
17k
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/