Skip to content

Instantly share code, notes, and snippets.

@philmtd
Created July 17, 2018 14:39
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 philmtd/3bfdb97ee6693d9f549be99d011120a9 to your computer and use it in GitHub Desktop.
Save philmtd/3bfdb97ee6693d9f549be99d011120a9 to your computer and use it in GitHub Desktop.
cherry-pick -n in reverse order
#!/bin/sh
reverse() {
local result=
for word in $@; do
result="$word $result"
done
echo "$result"
}
SHA=$(reverse $@)
echo $SHA
git cherry-pick -n $SHA
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment