scripts/devel/git-cherry-select
2026-01-11 14:06:54 +01:00

9 lines
268 B
Bash
Executable file

#!/bin/zsh
#dep:fzf git
if [[ -z $1 || $1 == "-h" || $1 == "--help" ]]; then
echo "Usage: ${0:t} <branch>"
exit 1
fi
git log --oneline HEAD..$1 \
| fzf -m --preview "echo {} | awk '\$0=\$1' | xargs git show --color=always" \
| awk '$0=$1' | xargs git cherry-pick