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
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
atomic commits
Kai Howelmeyer
January 21, 2014
More Decks by Kai Howelmeyer
See All by Kai Howelmeyer
git tricks
kaihowl
3
150
git intro by mkilling
kaihowl
1
95
Other Decks in Research
See All in Research
論文紹介 "ReSim: Reliable World Simulation for Autonomous Driving"
kogo
0
630
世界モデルにおける分布外データ対応の方法論
koukyo1994
7
2.2k
National high-resolution cropland classification of Japan with agricultural census information and multi-temporal multi-modality datasets
satai
3
290
NII S. Koyama's Lab Research Overview AY2026
skoyamalab
0
310
定数整数除算・剰余算最適化再考
herumi
1
130
RS-Agent: Automating Remote Sensing Tasks through Intelligent Agent
satai
2
300
The mathematics of transformers
gpeyre
0
330
Ankylosing Spondylitis
ankh2054
0
170
通時的な類似度行列に基づく単語の意味変化の分析
rudorudo11
0
310
「車1割削減、渋滞半減、公共交通2倍」を 熊本から岡山へ@RACDA設立30周年記念都市交通フォーラム2026
trafficbrain
1
1.2k
Data Visualization Tools in the Age of AI
flekschas
0
160
オーストリア流 都市の公共交通サービス水準評価@公共交通オープンデータ最前線2026
trafficbrain
0
190
Featured
See All Featured
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.6k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Evolving SEO for Evolving Search Engines
ryanjones
0
220
Designing Experiences People Love
moore
143
24k
GraphQLとの向き合い方2022年版
quramy
50
15k
Building the Perfect Custom Keyboard
takai
2
790
ラッコキーワード サービス紹介資料
rakko
1
3.7M
Practical Orchestrator
shlominoach
191
11k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
1
350
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.2k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.3k
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/