Cannot see all my branches in my main project.
Asked by axacodeveloper:

Its been a while since I logged in to our account but now when I do I cannot find/see all our branches created for a specific project. Before I could access them by going inside the project and then use the drop down to choose which branch. No there are other different branches or subfolders that I havent seen before and many of the regular branches are missing. Probably I have missed something but what? Appreciate all the guidance I can get, thank you!


Answers:
author: Theodora Boudale
body: Hi [@axacodeveloper](/t5/user/viewprofilepage/user-id/1927312) and welcome to the community!

When you open the **Branches** page of a repository, there is a dropdown that says **Active branches** right above the list of branches:

![Screenshot 2024-07-12 at 14.39.13.png](https://community.atlassian.com/t5/image/serverpage/image-id/335279iEC96855451F39A51/image-size/large?v=v2&px=999 "Screenshot 2024-07-12 at 14.39.13.png")

Click on that, select **All branches** and then check the branch list again. Someone might have merged these branches to the repo's main branch, and in this case they won't show in the **Active branches**.

If you still don't see the branches listed when you select **All branches**, then someone has deleted them. You will need to reach out to the other users who have access to the repo to find out which one deleted the branches. Any additional branches that were not there before could have been added only by other users that have write access to the repo.

Please feel free to reach out if you have any questions.

Kind regards,  
Theodora

comments: author: axacodeveloper
body: Hi Theodora and thank you for your answer!  

I followed what you described and what seems strange is that the whole file structure seems to have been changed and also now I find everything under an "untitled folder" that bitbucket has created. If someone has deleted these, although I find it not very likely, is there a way to recover it?  

Thank you again!  

Kind regards  
Christoffer


author: Theodora Boudale
body: Hi Christoffer,

I'm not sure what file structure you are referring to. Are you talking about the source code in a certain repository that you see if you navigate to the **Source** page from the left sidebar?

You mention an "untitled folder" that Bitbucket has created, and this makes me think of **Projects** , if you go to <https://bitbucket.org/workspace-id/workspace/projects/>, where **workspace-id** replace with the ID of your workspace. In there, you may see a project "Untitled project", that was created automatically by Bitbucket. Projects are like folders where you can organize repositories within a workspace. You can create more and also switch the project a repo belongs to. That's a completely different thing, though, than seeing an "untitled folder" in the source code of your repo.

Can you please clarify which of the two you are referring to?

Kind regards,  
Theodora


author: axacodeveloper
body: Hi Theodora and thank you for sticking with me and my rookie questions!  

I feel I should provide a bit more info. What I have is a repository that contains an android app, or more precisely multiple flavours/branches of an android app. So I have the main/master branch and then the different versions of it, just different versions for different clients so nothing major separates them.  

\<screenshot removed\>

<br />

In the dropdown that you see in the picture above I used to get all the different versions/branches that we had, although now only a few shows up with the "branded/kau" for example. There should be alot more of them underneath the master bransch, or at least it used to be. And all those "feature/xxx" branches I dont know where they come from. I get the feeeling that things have been moved around a bit but I don't understand how.  

If I look at the Branches in the left menu i get the following:  

\<screenshot_removed\>  

Not sure how to read it but do I need to sync something?  

Thank you again Theodora for helping me and I hope this additional info provide more clarity, let me know if you need any more info from me. Maybe its very easy fix (I hope so)...


author: Theodora Boudale
body: Hi Christoffer,

Thank you for the info! Just a heads up, I removed the screenshots from your post for privacy reasons.

Branches in a repository can be created, merged, renamed, or deleted by any user who has at least write access to the repository. Atlassian doesn't make any such changes to repositories hosted in Bitbucket Cloud. If the additional "feature/xxx" branches weren't created by you, they were created by another user with access.

Similarly, if the missing branches are also not listed in the **Branches** page when you select the **All branches** dropdown, they have either been deleted by another user or they may have also been renamed into these "feature/xxx" branches. I don't know which one is the case, you will need to ask these users.

You can check which users have access to the repo by doing the following:

1. Open the repository on Bitbucket Cloud website
2. Select **Repository settings** from the left sidebar
3. Then select **Repository permissions** (from the new left sidebar)

Any of the users or groups listed there with at least write permissions could have created new branches or merged, renamed, or deleted existing ones.

If the branches were indeed deleted, and if you or any of the other users with access have a clone of the repository on your own computers where the deleted branches exist, you can push them back to the Bitbucket repository. We can only restore backups from the last 7 days and the last activity in this repo was in 2023, so our backups will not have any of these branches.

You can prevent this issue from occurring again by setting up branch restrictions. With branch restrictions, you can uncheck the options **Allow deleting this branch** and **Allow rewriting branch history** to prevent users from deleting specific branches or rewriting their history:

* <https://support.atlassian.com/bitbucket-cloud/docs/use-branch-permissions/>

Regarding your last question, the **Branches** page shows that all the branches listed there are several commits ahead of master. This means that they have commits that are not reachable by the HEAD of the master branch. You don't have to merge them into master if you don't want to.

Kind regards,  
Theodora


author: axacodeveloper
body: Hi Theodora,  

Thank you for your concern and removing the images! I guess I need to do a bit of research amongst our users.  

Thank you again very much for your help and support!  

Best regards  
Christoffer


author: Theodora Boudale
body: You are very welcome, Christoffer.

Please feel free to reach out if you ever need anything else!

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud