Issue #8342 open

Deleted branch still listed (BB-9455)

Abhaya Thapa
created an issue
  1. Delete branch branch-name.
  2. still lists the branch-name.
  3. When clicking on this branch, leads to 404 error as branch is deleted.

The deleted branch should not be listed on as branch no longer exists

Comments (23)

  1. reynardmh

    I don't think so. I have deleted branch from 2 weeks ago that is still appearing. It's very annoying when your workflow is using branches for each developer and pull request for code review. I have a lot of deleted branches that is still listed. This should be a major issue. This ticket has been open for more than 6 months. Please fix this soon!

  2. Brendan Mannix

    I can confirm I am experiencing the same issue. If this is a simple caching issue, why has this not been fixed in 6 months? It seems like it would be fairly straightforward to invalidate the cache whenever a branch is deleted...

  3. Thibault M.

    Issue (when using Pull Request with "delete branch" option) still exist since... minimum 2 years!!! If you don't have skill (or time) to fix this, add a button to manually force remove orphan branch or hide branch who leads to 404 error when clicking on.

  4. Alexandre Blondin Massé

    I had the same problem. I deleted a branch with the command

    git push origin :<branch-to-delete>

    The problem was that it still appeared in the list. I solved my problem by creating a new branch from the Bitbucket web interface with exactly the same name, and then I deleted it again from the web interface (under the tab branches, hover on the right part of the branch you wish to delete and click on the three dots and then select delete branch). And then, it was not in my branches list anymore.

    This is not very elegant, but at least, I could clean my repository.

  5. Matthew Baker

    We started experiencing this Friday on several branches and it just happened again today. The issue does not correct itself after time (whenever the "cache" refreshes), despite comments from Atlassian saying as much. Clicking the branch is a dead link like described above, and trying to delete the branch throws an error. Pull requests tied to the branch that were merged are also being odd (e.g., showing a mix of different states like "No files changed" but remaining open, showing a conflict and saying either the source or destination branch is deleted, etc.). The workaround mentioned above about recreating the branch and deleting it does work, but we shouldn't have to resort to this workaround.

    For those interested in tracking continued progress of this bug, I noticed that a duplicate issue #9608 was marked as invalid for some reason. #9688 appears to be another duplicate.

  6. Jiří Šimeček

    Also confirming this is still an issue although some other issues regarding same problem were closed and marked as invalid saying it is OK without further investigating (eg #9608) - quite sad.

    As it seems to me the "Bitbucket's purging cron/job" (mentioned by someone from staff) is not fired properly when branch is deleted via Pull Request.

    Eg: Happened to us last week we had circa 6 invalid branches that were still visible and all of them leaded to a dead link. When I created one branch and then deleted it the purging job was fired correctly (my guess) and all branches were properly removed.

    Its quite pain for us to have many branches and half of them are active and half was already merged and deleted - It's not simple to keep track of works in progress then...

    Thanks for looking into it Dan Bennett, Jiri

  7. Dan Bennett staff

    A couple of different vectors leading to this problem have been identified. We are working on some fixes and improvements and we should be able to close this issue in the next week or two.

  8. Log in to comment