Here’s git add -p
on steroids for patches.
Featured Content Ads
add advertising hereGiven a my.patch
you would possibly want to maybe well maybe maybe additionally hurry
./carve up-patch.py my.patch
It is seemingly you’ll maybe well maybe maybe take care of wherein bucket to assign every hunk.
At any 2nd, you would possibly want to maybe well maybe maybe additionally quit and my.patch
will hang unassigned hunks whereas all the diversified hunks can be moved to $BUCKET_NAME.patch
.
git-carve up-commit
The git-carve up-commit
repeat makes spend of carve up-patch.py
to carve up the HEAD
commit in a pair of commits.
Featured Content Ads
add advertising here# Rep backup sign
git sign backup-$(date +'%s')
# Break up HEAD
./git-carve up-commit
By default, it first git revert HEAD
after which commit all the patches resulting from the carve up.
When you occur to develop now not care in regards to the fashioned commit + revert commit pair, you would possibly want to maybe well maybe maybe additionally hurry:
./git-carve up-commit --reset
Usage in interactive rebase
It is seemingly you’ll maybe well maybe maybe spend git-carve up-commit
at some stage in interactive rebase, assuming you delight in gotten it in $PATH
:
Featured Content Ads
add advertising hereYour $EDITOR
will pop up with a chain of get
instructions.
After the commit you adore to delight in to carve up add: