Skip to content

set-upstream utility #375

@rstacruz

Description

@rstacruz

would anyone be interested in a utility that does this? i can make a PR if so.

#!/usr/bin/env sh
# git-pushup
#   Pushes the current branch via --set-upstream.
#   It's a shortcut for `git push --set-upstream origin <current branch>`.

remote=$1
[ -z $remote ] && remote=origin

git push --set-upstream $remote `git rev-parse --abbrev-ref HEAD`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions