First:
git format-patch -1 <sha1>
Then:
git am ../path/to/0001-file.patch
If patch did not apply cleanly:
rejected-apply
wiggle-rej
git add -p
git diff --cached
git am --continue
git show -1
git pull && git push
rej-clean
#!/bin/bash | |
find . -type f -name \*orig -print -delete | |
find . -type f -name \*rej -print -delete |
#!/bin/bash | |
set -o nounset -o errexit | |
test -f .git/rebase-apply/patch | |
rej-clean | |
patch -p1 < .git/rebase-apply/patch |
#!/bin/bash | |
find . -name \*.rej | | |
while read rej | |
do | |
echo $rej | |
wiggle -r ${rej%.rej} $rej | |
done |