Git create patch series for multipe commits.

Shawn Bohrer shawn.bohrer at gmail.com
Fri Sep 26 14:04:00 EDT 2014


On Fri, Sep 26, 2014 at 10:35:57AM -0700, Anand Moon wrote:
> Hi Shawn,
> 
> Thanks I will give it a try.
> 
> One more question, if the change belong to single file
> and we are fixing multiple issue we need to different commit
> for each changes. And then club them into patch series.
> Am I right.

I'm not sure if I understand the question or not.  If you need to fix
multiple issues that are all in the same source file but those fixes
are corrections to several different patches in your series, then yes
you should make a single new commit for each fix.  Then with 'git
rebase -i' you can roll each fix back into the correct patch.

If all of the fixes are going to be rolled back into a single patch
then you can simply make a single new commit and roll that back into
the correct patch with 'git rebase -i'.

If you are not familiar with 'git rebase -i' you should read the
"INTERACTIVE MODE" section in the man page 'git help rebase'.  It is an
amazingly powerful tool.

Oh, and I probably should have mentioned it in my first response.  But
if you've never sent a patch before it is a good idea to try sending
it to yourself first.  You can apply the patches to a new branch with
'git am'.

--
Shawn



More information about the Kernelnewbies mailing list