$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
atomic commits
Search
Kai Howelmeyer
January 21, 2014
Research
0
88
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
74
Other Decks in Research
See All in Research
「リアル×スキマ時間」を活用したUXリサーチ 〜新規事業を前に進めるためのUXリサーチプロセスの設計〜
techtekt
PRO
0
160
論文紹介:Safety Alignment Should be Made More Than Just a Few Tokens Deep
kazutoshishinoda
0
140
長期・短期メモリを活用したエージェントの個別最適化
isidaitc
0
320
EarthDial: Turning Multi-sensory Earth Observations to Interactive Dialogues
satai
3
390
J-RAGBench: 日本語RAGにおける Generator評価ベンチマークの構築
koki_itai
0
1k
Satellites Reveal Mobility: A Commuting Origin-destination Flow Generator for Global Cities
satai
3
180
Language Models Are Implicitly Continuous
eumesy
PRO
0
350
When Learned Data Structures Meet Computer Vision
matsui_528
1
1.1k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
63
34k
PhD Defense 2025: Visual Understanding of Human Hands in Interactions
tkhkaeio
1
320
競合や要望に流されない─B2B SaaSでミニマム要件を決めるリアルな取り組み / Don't be swayed by competitors or requests - A real effort to determine minimum requirements for B2B SaaS
kaminashi
0
110
さまざまなAgent FrameworkとAIエージェントの評価
ymd65536
1
350
Featured
See All Featured
For a Future-Friendly Web
brad_frost
180
10k
Automating Front-end Workflow
addyosmani
1371
200k
Thoughts on Productivity
jonyablonski
73
5k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
700
Producing Creativity
orderedlist
PRO
348
40k
Visualization
eitanlees
150
16k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.7k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.1k
The Pragmatic Product Professional
lauravandoore
37
7.1k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Unsuck your backbone
ammeep
671
58k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
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/