question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

error with branch upstream/master

See original GitHub issue

Description

that is probably a follow up of this issue https://github.com/desktop/desktop/issues/4130

I want to keep my fork sync with the original master (upstream) so I follow this guideline: https://help.github.com/articles/configuring-a-remote-for-a-fork/ https://help.github.com/articles/syncing-a-fork/

as far I can see, the 1st steps add a new branch upstream/master in github Desktop as far I understand the help of github Desktop, I can’t sync my fork from the upstream with github Desktop, so I follow the 2nd steps to do it with git bash. And it works well.

But in github Desktop, if I want to change the branch to upstream/master, I have this error message: A branch with that name already exists capture

Version

  • GitHub Desktop: 1.3.0-beta2
  • Operating system: window10

Steps to Reproduce

see the description above

Expected Behavior

I wish it could be possible to sync fork from upstream with github Desktop (more simple than using git). And, at least, this error message should not appear in github Desktop

Logs

2018-07-18.desktop.beta.log

there is something strange in this log: 2018-07-18T09:35:49.910Z - warn: [ui] fetchRepository: 'vincent3569/zenphoto-perso' returned a 404 but this repository exists on github (https://github.com/vincent3569/zenphoto-perso). and in fact, I can push my commit to github, and I have this error:

capture2

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

10reactions
wireddowncommented, Nov 22, 2018

Hi, the Past! I got here from a Google search for github desktop “a branch with that name already exists” master because I wanted to update my fork from the original upstream repository. When I tried switching to its master branch, Desktop showed that error message.

Desktop 1.5.0

In this version, the workflow appears to have changed.

  1. Switch to your default branch using the Current branch dropdown
    • For the use case of updating your fork from the upstream original, this is typically your master branch.
  2. Open the Current branch dropdown again.
  3. Below the list of your branches, at the bottom, there’s a button called Choose a branch to merge into master
  4. Click that and select the name for your fork’s upstream branch.
    • Often this is called upstream/master.

Feedback on the 1.5.0 workflow

  • When I open my repository in Desktop, I don’t know whether or not the upstream repo has any new changes to consider for merging – the History tab doesn’t have a “look at me!” dot like @shiftkey’s screenshot. I acknowledge that a repo might have many branches to compare against, but if you don’t want to guess which one is the tracking/upstream branch, would you let users configure which one to “auto compare”?
  • The error message is incomplete – there’s no remedy or suggestion offered (4th bullet). When master or origin or upstream is in the name of the branch, it seems reasonable to guess that the user is trying to update their fork and adding “If you’re trying to update from another repository that has a branch with this name, see $HELP_URL for more information.” would at least give the user a next step rather than a dead end.
  • Going further, this workflow seems like a hot path through the application. Would adding mouse/keyboard accelerators help users avoid these pitfalls?

Missing “dirty dot”

compare-branches

3reactions
HunterDGcommented, Dec 27, 2019

Same issue - December 2019 - no ‘dirty’ dot though upstream/master has changed, and “a branch with that name already exists” error when trying to switch to it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

how to address Git error "the requested upstream branch ...
git fetch upstream master:master : this work only when you are not on master . If you are on master , a simple...
Read more >
Fix Git's "fatal: no upstream branch" error quickly example
Git's 'no upstream branch' error can easily be fixed by setting the upstream branch to origin. Branch has no upstream fix commands. The...
Read more >
Git - Fix Error: The Current Branch Has No ... - Unfuddle Support
How to fix Git error: The current branch has no upstream branch. An upstream branch is a remote branch that is being tracked...
Read more >
How to fix fatal:the current branch master has no upstream ...
The fatal: The current branch master has no upstream branch error occurs when you have not configured git in such a way that...
Read more >
Git Fixes: The Current Branch Has No Upstream Branch
This happens because of your newly created branch. Your Git is not configured to create that same branch on remote. So you are...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found