Skip to content

Instantly share code, notes, and snippets.

@jottenlips
Created October 2, 2020 21:59
Show Gist options
  • Select an option

  • Save jottenlips/823dcbfea048dbf855d398ff02616761 to your computer and use it in GitHub Desktop.

Select an option

Save jottenlips/823dcbfea048dbf855d398ff02616761 to your computer and use it in GitHub Desktop.
Push to the upstream of your branch even if it does not exist remote.
alias branch='git symbolic-ref --short HEAD'
alias upstream='git push --set-upstream origin $(echo $(branch))'
# use
# cd some_project
# upstream
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment