dotfiles/.local/bin/scripts/git-cherry-get
2022-03-18 08:50:53 +01:00

4 lines
253 B
Bash
Executable file

#!/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