Skip to content

Instantly share code, notes, and snippets.

@najmam
Last active December 22, 2022 10:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save najmam/c4aa7114d4f02a9f10b24a3a88651b39 to your computer and use it in GitHub Desktop.
Save najmam/c4aa7114d4f02a9f10b24a3a88651b39 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e
set -o pipefail
start=$1
stop=$2
delay=$3
for rev in $(git log --oneline ${start}..${stop} |tac |cut -d' ' -f1); do
git cherry-pick -n ${rev}
git commit -m "$(git log -n 1 --format=%s ${rev})"
sleep ${delay}
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment