Skip to content

Instantly share code, notes, and snippets.

@jdarcy
Created November 17, 2016 21:25
Show Gist options
  • Save jdarcy/5625eabaef00f8771de5588bef5ca857 to your computer and use it in GitHub Desktop.
Save jdarcy/5625eabaef00f8771de5588bef5ca857 to your computer and use it in GitHub Desktop.
Git branch-combining script
#!/bin/bash
log_unique () {
git log --reverse --oneline $1 --not master
}
for branch in $*; do
log_unique $branch | while read hash summary; do
echo "=== $hash ($branch) $summary"
git cherry-pick $hash
#git show $hash | patch -p1 -F100
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment