Skip to content

Instantly share code, notes, and snippets.

@sevcsik
Last active August 29, 2015 14:19
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 sevcsik/0ea332a4d557df08b500 to your computer and use it in GitHub Desktop.
Save sevcsik/0ea332a4d557df08b500 to your computer and use it in GitHub Desktop.
Easy submit to gerrit
#!/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