Skip to content

Instantly share code, notes, and snippets.

@bratchenko
Created August 4, 2014 08:58
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 bratchenko/cdb4cf49a8cd92aa3855 to your computer and use it in GitHub Desktop.
Save bratchenko/cdb4cf49a8cd92aa3855 to your computer and use it in GitHub Desktop.
Git push to gerrit (put into ~/.gitconfig)
[alias]
pub = "!f() { git push -u ${1:-origin} HEAD:`git config branch.$(git name-rev --name-only HEAD).merge | sed -e 's@refs/heads/@refs/for/@'`; }; f"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment