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
正規分布と最適化について
koide3
1
250
LLM の Attention 機構まとめ — 数式・計算量・メモリ
puwaer
8
2.1k
【Zozo Research 技術共有会】三次元領域の現在と展望
mickey_0226
3
340
Dual Quadric表現を用いた動的物体追跡とRGB-D・IMU制約の密結合によるオドメトリ推定
nanoshimarobot
0
410
通時的な類似度行列に基づく単語の意味変化の分析
rudorudo11
0
310
長時間動画QAにおけるマルチエージェント推論 ・SVAgent: Storyline-Guided Long Video Understanding via Cross-Modal Multi-Agent Collaboration
murakawatakuya
1
100
事後確率分布の共分散について
koide3
0
120
Research Engineerという仕事 / Research Engineering: Bridging Research and Business
chck
1
210
SoftMatcha 2: 1兆語規模コーパスの超高速かつ柔らかい検索
e869120_sub
6
3.5k
2026年3月1日(日)福島「除染土」の公共利用をかんがえる
atsukomasano2026
0
630
Model Discovery and Graph Simulation: A Lightweight Gateway to Chaos Engineering
anatolykr
0
200
はじまりの クエスチョンブック —余暇と豊かさにあふれた社会とは?
culturaltransition
PRO
0
510
Featured
See All Featured
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
220
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
270
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
240
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
250
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.3k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3.4k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
180
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.5k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.2k
Prompt Engineering for Job Search
mfonobong
0
340
How to train your dragon (web standard)
notwaldorf
97
6.7k
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/