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
77
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
CVPR2025論文紹介:Unboxed
murakawatakuya
0
150
MIRU2025 チュートリアル講演「ロボット基盤モデルの最前線」
haraduka
15
8k
SNLP2025:Can Language Models Reason about Individualistic Human Values and Preferences?
yukizenimoto
0
120
Learning to (Learn at Test Time): RNNs with Expressive Hidden States
kurita
0
170
論文読み会 SNLP2025 Learning Dynamics of LLM Finetuning. In: ICLR 2025
s_mizuki_nlp
0
210
スキマバイトサービスにおける現場起点でのデザインアプローチ
yoshioshingyouji
0
220
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
0
160
A scalable, annual aboveground biomass product for monitoring carbon impacts of ecosystem restoration projects
satai
4
240
投資戦略202508
pw
0
560
20250624_熊本経済同友会6月例会講演
trafficbrain
1
610
集合間Bregmanダイバージェンスと置換不変NNによるその学習
wasyro
0
140
診断前の病歴テキストを対象としたLLMによるエンティティリンキング精度検証
hagino3000
1
130
Featured
See All Featured
The Straight Up "How To Draw Better" Workshop
denniskardys
236
140k
Why You Should Never Use an ORM
jnunemaker
PRO
59
9.5k
It's Worth the Effort
3n
187
28k
Making the Leap to Tech Lead
cromwellryan
135
9.5k
Intergalactic Javascript Robots from Outer Space
tanoku
272
27k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.9k
Become a Pro
speakerdeck
PRO
29
5.5k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
Navigating Team Friction
lara
189
15k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
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/