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.

'Delete Branch' warns that branch already exists on remote after it's deleted

See original GitHub issue

Description

When I click on Branch > Delete…, I get a popup dialogue saying “The branch also exists on the remote, do you wish to delete it there as well?”. This is a useful message, but it always seems to say that, even after I have deleted the branch in GitHub after I merge. I have also tried switching to master and Fetching Origin first and trying again, but I am still getting the same message.

Version

GitHub Desktop version: 1.0.3

OS version: 10.12.6

Steps to Reproduce

  1. Create branch in GitHub Desktop
  2. Publish branch to GitHub
  3. Delete branch in GitHub
  4. Click to delete branch in Github Desktop

image

Expected behavior: I expected the branch to be deleted on the remote and thus not be notified otherwise.

Actual behavior: I was informed that the branch still exists on the remote, even after having deleted the branch.

Reproduces how often: 100%

Logs

2017-10-04.desktop.production.log

Additional Information

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
JordanMussicommented, Nov 30, 2017

Fixed in #3469 😃

1reaction
shiftkeycommented, Oct 9, 2017

So this is the work to check if the branch exists on the remote:

https://github.com/desktop/desktop/blob/c23b1ae24cd82233e4b0cb3503f8fc621cb370d5/app/src/lib/git/branch.ts#L88-L100

If someone wants to pick this up, they could look to making that reusable, so we can check when displaying the form whether the remote exists. That would bypass the need to do a fetch, but still incurs the network penalty.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Git remote branch deleted, but still it appears in 'branch
Deletes all stale remote-tracking branches under <name>. These stale branches have already been removed from the remote repository referenced by <name>, but are ......
Read more >
How to delete a Git branch locally and remotely? - Medium
In such a case you'll have to use the command like so. The -d option is an alias for --delete, which only deletes...
Read more >
How to Delete a Branch in GitHub - Nira
Step 4 – Delete the Branch Locally · Open the Command Window from the Git repository root. · Enter the command $ git...
Read more >
How to Delete a Branch in Git Locally and ... - MakeUseOf
The basic command syntax for deleting a branch is: git branch (-d | -D) [-r] <branchname>... ... When things go right, you'll see...
Read more >
Manage Git branches | PyCharm Documentation - JetBrains
In the Branches popup or from the Branches pane of the Git tool window, right-click the branch you want to delete and choose...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

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