Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save hackebrot/ec42ae29ed1add2e1527618d7e2dabe5 to your computer and use it in GitHub Desktop.
Save hackebrot/ec42ae29ed1add2e1527618d7e2dabe5 to your computer and use it in GitHub Desktop.
addprx = "!f() { b=`git symbolic-ref -q --short HEAD` && \
echo \"Making branch for pull request #$1 [pr/$1]\" && \
git fetch origin pull/$1/head:pr/$1 && \
echo \"Rebasing pr/$1 onto $b...\" && \
git fetch -q -f origin pull/$1/merge:refs/PR_MERGE_HEAD && \
git rebase -q --onto $b PR_MERGE_HEAD^ pr/$1 && \
git checkout -q $b && echo && \
git diff --stat $b..pr/$1 && echo && \
git log --oneline $b..pr/$1; \
git update-ref -d refs/PR_MERGE_HEAD; \
}; f"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment