Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

What is the reason that I am seeing code from another repository?

jianbai-wang September 25, 2024

I have had 2 repos, let's say Repo-A and Repo-B. For a long time (3 years), the code checked out and in on the 2 repos never got crossed.

But today I noticed a very strange thing. I can see the branches, commits, tags of Repo-B from Repo-A! I verified it using both SourceTree and GitKrakan, and directly on BitBucket's web app. I thought it might be because my repositories somehow get mixed when checking out Repo-B from Repo-A. So I deleted the both local repos and re-cloned them. It still the same. I can even checkout code of Repo-B from Repo-A. Interestingly, I noticed this is not happening to the two repos all the time. It only occurred for about 1 year or so. Because I can see it from the BitBucket Web App, it is not just my local repos.

I need help to under stand how this could happen, and more importantly, how to straighten them out.

Thanks for any help.

 

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 27, 2024

Hi Jianbai,

The only reason I can think of is that someone pushed (perhaps accidentally?) the branches of one repo to the other one.

We may be able to see who made such a push in our logs, but that depends on how long ago the push was made and if the events are still available in our logs.

Since you have access to a workspace on a paid billing plan, you can create a ticket with the support team, share the URLs of the two repos, and explain which branches you are referring to, for further investigation. The support ticket will be visible only to you and Atlassian staff, so anything you post there won't be publicly visible.

You can create a ticket via https://support.atlassian.com/contact/#/, in "What can we help you with?" select "Technical issues and bugs" and then Bitbucket Cloud as product. When you are asked to provide the workspace URL, please make sure you enter the URL of the workspace that is on a paid billing plan to proceed with ticket creation.

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

Kind regards,
Theodora

jianbai-wang September 28, 2024

Hi Theodora, 

Thanks for your response. I need to get an OK from my company and then post a question. More importantly, after finding out what is wrong, I would need to know how to fix it or cleanup the mess.

Regards,

Jianbai

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 30, 2024

Hi Jianbai,

The solution depends on the state of these branches. If these branches were not merged with branches of repo A, the solution may be as simple as deleting them. If they were merged with branches of repo A or if they were pushed on top of existing branches of repo A, you may need to do a git reset or an interactive git rebase to remove the commits. I would recommend taking a backup of repo A (you can do a git clone with the --mirror flag to get all branches) before taking any action, in case you accidentally delete something you didn't want to delete. If you open a support ticket, explain the issue and we look at the repos in order to understand the issue, we can give better advice.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events