Re: How to split a patch

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: How to split a patch

From: Matthieu Moy <hidden>
Date: 2016-06-15 22:44:08

"Paolo Ciarrocchi" [off-list ref] writes:
Yes it helps but I still wonder whether thereis a "simpler" way to achive that.
Is it possible to split a patch selecting the hunk in git gui or any
other graphical
tool?
You can apply the patch without commiting it, and them make several
partial commits, by right-click "stage hunk for commit" in git-gui.

-- 
Matthieu

Re: How to split a patch

From: Wincent Colaiuta <hidden>
Date: 2016-06-15 22:44:08

El 28/1/2008, a las 10:47, Matthieu Moy escribió:
"Paolo Ciarrocchi" [off-list ref] writes:
quoted
Yes it helps but I still wonder whether thereis a "simpler" way to  
achive that.
Is it possible to split a patch selecting the hunk in git gui or any
other graphical
tool?
You can apply the patch without commiting it, and them make several
partial commits, by right-click "stage hunk for commit" in git-gui.
Or "git add --interactive", which isn't GUI but is a similar idea in  
command line form.

And in case you've already applied the patch you can do a "git reset  
HEAD^"; this moves your HEAD back by one commit, puts the index back  
the way it was, but leaves the changes in your working tree. Then you  
stage your hunks and commit them like Matthieu says.

Cheers,
Wincent
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help