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
96
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
言語モデルから言語について語る際に押さえておきたいこと
eumesy
PRO
5
1.7k
存立危機事態の再検討
jimboken
0
260
FUSE-RSVLM: Feature Fusion Vision-Language Model for Remote Sensing
satai
3
250
量子コンピュータの紹介
oqtopus
0
250
【NICOGRAPH2025】Photographic Conviviality: ボディペイント・ワークショップによる 同時的かつ共生的な写真体験
toremolo72
0
200
CyberAgent AI Lab研修 / Social Implementation Anti-Patterns in AI Lab
chck
6
4.1k
2025-11-21-DA-10th-satellite
yegusa
0
140
「なんとなく」の顧客理解から脱却する ──顧客の解像度を武器にするインサイトマネジメント
tajima_kaho
10
7.1k
Aurora Serverless からAurora Serverless v2への課題と知見を論文から読み解く/Understanding the challenges and insights of moving from Aurora Serverless to Aurora Serverless v2 from a paper
bootjp
6
1.6k
英語教育 “研究” のあり方:学術知とアウトリーチの緊張関係
terasawat
1
610
Collective Predictive Coding and World Models in LLMs: A System 0/1/2/3 Perspective on Hierarchical Physical AI (IEEE SII 2026 Plenary Talk)
tanichu
1
310
それ、チームの改善になってますか?ー「チームとは?」から始めた組織の実験ー
hirakawa51
0
960
Featured
See All Featured
エンジニアに許された特別な時間の終わり
watany
106
240k
Exploring anti-patterns in Rails
aemeredith
2
290
The Curse of the Amulet
leimatthew05
1
10k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
190
How to build a perfect <img>
jonoalderson
1
5.3k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Building the Perfect Custom Keyboard
takai
2
720
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.2k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
410
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
490
A Modern Web Designer's Workflow
chriscoyier
698
190k
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/