Skip to content

Instantly share code, notes, and snippets.

@timfel
Created April 12, 2010 07:59
Show Gist options
  • Save timfel/363372 to your computer and use it in GitHub Desktop.
Save timfel/363372 to your computer and use it in GitHub Desktop.
#!/usr/bin/env git
CURRENT_BRANCH=$(git branch --no-color | grep "*" | awk '{print $2}')
BRANCHES=$(git branch --no-color | grep -v "*")
TMPBRANCH="tmp-$(date +%Y%m%d%H%M)"
git checkout -b "$TMPBRANCH"
for i in $BRANCHES; do
git merge -s ours "$i"
done
git shortlog -n -s
git checkout "$CURRENT_BRANCH"
git branch -D "$TMPBRANCH"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment