Created
April 22, 2015 03:42
-
-
Save mjj2000/4bfe19b3347f013ae1e4 to your computer and use it in GitHub Desktop.
GIT push to Gerrit for current branch
This file contains 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 | |
# git push to gerrit for current branch | |
branch_name=$(git symbolic-ref -q HEAD) | |
branch_name=${branch_name##refs/heads/} | |
branch_name=${branch_name:-HEAD} | |
git push origin HEAD:refs/for/$branch_name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment