Last active
August 29, 2015 14:19
-
-
Save sevcsik/0ea332a4d557df08b500 to your computer and use it in GitHub Desktop.
Easy submit to gerrit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -z "$1" ] | |
then | |
echo "Base commit:" | |
read COMMIT | |
else | |
COMMIT="$1" | |
fi | |
BRANCH=`git rev-parse --abbrev-ref HEAD` | |
git checkout -b `git rev-parse --abbrev-ref HEAD`-review $COMMIT | |
git merge --squash $BRANCH | |
git commit | |
git-review -R $BRANCH | |
git checkout $BRANCH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment