Skip to content

Push does not consistently set the remote as the upstream branch #871

@raymond-rebbeck

Description

@raymond-rebbeck

If Push Branch is performed via Web Ui then the -u (--set-upstream) argument is always specified which results in the remote branch being set as the upstream tracking branch. This allows for example changes made to the remote to be pulled down locally.

However a push specified elsewhere, such as with Sync or the expert mode Push options does not set this argument and so the upstream is never set.

This difference in behaviour is confusing and there does not seem to be any reason to not set the remote as the upstream branch given that it would be set as such anyway if a push was performed via Web UI or if the local branch was deleted and then checked out again from the remote branch.

Noticed this when testing some scenarios in relation to #864 as doing a git reset --hard ... locally and pulling commits that are on the remote is useful to explore pull behaviour.

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