Skip to content

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

Closed

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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