splitting git commits
splitting git commits
Posted Feb 12, 2026 0:31 UTC (Thu) by AdamW (subscriber, #48457)Parent article: Evolving Git for the next decade
"He discussed the workflow for splitting a Git commit, which involves seven separate commands with Git's current UI. Most users do not know how to do this, he said."
Sure I know how to do it!
cp bigfilewithlotsofchanges.py /tmp
git reset --hard
git checkout -b letstrythatagain
gedit bigfilewithlotsofchanges.py /tmp/bigfilewithlotsofchanges.py
copy/paste chunk
git commit -a -s
copy/paste chunk 2
git commit -a -s
rinse, repeat
what do you mean, that's not the right way?! Crazy talk.
