Skip to content

Make git push -u without arguments set up the upstream remote by default #1061

Open
@pasky

Description

@pasky

A common workflow with the very popular workflow of topic branches is to create a branch, commit, then push it upstream. This invariably devolves to calling git push, receiving the hint

fatal: The current branch pasky-auth-token has no upstream branch.
To push the current branch and set the remote as upstream, use

    git push --set-upstream origin pasky-auth-token

and copy-pasting that to actually do the first push of the topic branch.

Ideally, just calling git push -u should do the same thing as this copy-paste (the hint is always correct in typical situations).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions