How to break a series of git commits into patches for submission to another project
Posted
by krosenvold
on Stack Overflow
See other posts from Stack Overflow
or by krosenvold
Published on 2010-06-08T18:55:35Z
Indexed on
2010/06/09
12:02 UTC
Read the original article
Hit count: 273
So I've been bashing away at my favorite open source project for quite some time, and It's time for submitting issues with patches back. I have to regroup my commits more or less fully, and hopefully extract some pieces of code that can function as distinct patches to avoid code bombing. Currently I usually do something like this:
- rebase/squash everything to one commit since the old ones often don't make sense as patches
- undo that commit
- start adding stuff that I think fits to one commit, using add/add -i
- commit
- stash the rest
- test that commit
- re-apply the stash and start from 3 until all is accounted for
It works, but is there a better way ?
© Stack Overflow or respective owner