Skip to content

Instantly share code, notes, and snippets.

@scwood
Created August 24, 2020 18:57
Show Gist options
  • Save scwood/7166ab805fad2ab0dd28933acc83a61b to your computer and use it in GitHub Desktop.
Save scwood/7166ab805fad2ab0dd28933acc83a61b to your computer and use it in GitHub Desktop.
Push to current branch name in the origin
alias gpob='git push -u origin $(getCurrentGitBranch)'
getCurrentGitBranch() {
local branch=$(git rev-parse --abbrev-ref HEAD)
echo $branch;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment