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
論文紹介: ReGenesis: LLMs can Grow into Reasoning Generalists via Self-Improvement
hisaokatsumi
0
110
一人称視点映像解析の最先端(MIRU2025 チュートリアル)
takumayagi
6
3.9k
問いを起点に、社会と共鳴する知を育む場へ
matsumoto_r
PRO
0
660
2025/7/5 応用音響研究会招待講演@北海道大学
takuma_okamoto
1
220
Adaptive Experimental Design for Efficient Average Treatment Effect Estimation and Treatment Choice
masakat0
0
120
IMC の細かすぎる話 2025
smly
2
690
国際論文を出そう!ICRA / IROS / RA-L への論文投稿の心構えとノウハウ / RSJ2025 Luncheon Seminar
koide3
10
5.5k
MetaEarth: A Generative Foundation Model for Global-Scale Remote Sensing Image Generation
satai
4
330
Combinatorial Search with Generators
kei18
0
1k
長期・短期メモリを活用したエージェントの個別最適化
isidaitc
0
190
[論文紹介] Intuitive Fine-Tuning
ryou0634
0
130
アニメにおける宇宙猫ミームとその表現
yttrium173340
0
100
Featured
See All Featured
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Designing for Performance
lara
610
69k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.7k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
The Cult of Friendly URLs
andyhume
79
6.6k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.1k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
22k
It's Worth the Effort
3n
187
28k
Documentation Writing (for coders)
carmenintech
75
5.1k
Building Adaptive Systems
keathley
44
2.8k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
620
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/