git-rebase-patch - Man Page
Rebases a patch
Examples (TL;DR)
- Find the commit the patch applies to and do a rebase:
git rebase-patch patch_file
Synopsis
git-rebase-patch <patch-file>
Description
Given you have a patch that doesn´t apply to the current HEAD, but you know it applied to some commit in the past, git-rebase-patch will help you find that commit and do a rebase.
Options
- <patch-file>
The patch to be applied.
Examples
Executing
$ git rebase-patch test.patch
could give you something like that:
Trying to find a commit the patch applies to... Patch applied to dbcf408dd26 as 7dc8b23ae1a First, rewinding head to replay your work on top of it... Applying: test.patch Using index info to reconstruct a base tree... Falling back to patching base and 3-way merge... Auto-merging README.txt
Then your last commit has the changes of the patch and is named test.patch.
Author
Written by Niklas Fiekas <niklas.fiekas@tu-clausthal.de>
Reporting Bugs
See Also
Referenced By
October 2017 Git Extras