Skip to content

Smooth out the Set Upstream workflow #165

Open
@dogweather

Description

@dogweather

On git, after creating a local branch, and trying to push the commits upstream, one gets a very helpful error message which tells you what to do:

$ git push
fatal: The current branch tree-parser has no upstream branch.
To push the current branch and set the remote as upstream, use

    git push --set-upstream origin tree-parser

$ git push --set-upstream origin tree-parser    # Via simple copy & paste

That (1) tells you about the problem, (2) tells you how to fix it, (3) creates the new remote branch, and (4) sets it up as upstream.

In contrast, gitless only does (1):

$ gl publish
✘ No dst branch specified and the current branch has no upstream branch set
$ gl branch -su origin/tree-parser    # After consulting both online docs and CLI help message
✘ Branch "tree-parser" doesn't exist in remote "origin"

And there I give up and fall back to git. :-) IMO we should both tell people how to fix the problem, and also create the upstream branch automatically. People coming from git will expect this.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions