Skip to content

Instantly share code, notes, and snippets.

@mjj2000
Created April 22, 2015 03:42
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 mjj2000/4bfe19b3347f013ae1e4 to your computer and use it in GitHub Desktop.
Save mjj2000/4bfe19b3347f013ae1e4 to your computer and use it in GitHub Desktop.
GIT push to Gerrit for current branch
#!/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