dotfiles/.local/bin/scripts/git-cherry-get

5 lines
253 B
Plaintext
Raw Normal View History

2022-03-18 07:50:53 +00:00
#!/bin/sh -e
# Pick commit $2 (or HEAD) from the given git repository
# https://stackoverflow.com/questions/5120038/is-it-possible-to-cherry-pick-a-commit-from-another-git-repository
git "--git-dir=$1/.git" format-patch -k -1 --stdout $2 | git am -3 -k