Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Is there a way to have different repository URLs point to the same repository on BitBucket?

Jonathan Smith January 25, 2021

Hello,

Just as the question says, is there a way to link to the same repository using different URLs on BitBucket?

For example, let's say I have a repository called Project_1. This repository has two branches in it: machine_1 and machine_2. The URL for the repository at this point is 'https://myusername@bitbucket.org/myusername/Project_1.git'

The two branches in the repository are almost identical, but with a few differences that need to be there because each branch contains files for physically separate computers. Going further, each computer is more-or-less the control terminal for a larger robotic platform (hence the names "machine_1" and "machine_2") that are both separate and almost identical.

The reason for this question is due to a scenario I've been running into that comes up after we're tasked by a client to "revisit" something with one of the machines (see branches) belonging to "Project_1".

When this happens, any machine that had changes made to it is tagged with an "-R1" (e.g. "machine_1-R1") to indicate this. This becomes a new branch. The repository "Project_1" at this point then also needs an "-R1".

So, the name of the repository would then change to "Project_1-R1" and the URL would change to 'https://myusername@bitbucket.org/myusername/Project_1-R1.git'.

If you've read up to this point, thank you since I'm sure some of this sounds unnecessary or a bit backwards. Trust me, I agree. I've tried to convince people aplenty that we shouldn't be following this model, but this naming schema is widely adopted at this point so there's really no way around it (and change is hard).

Anyway, the "-R1" tags are something that's used company-wide to try and keep everyone "on the same page" as to what was revisited and what "iteration" something's on. Fortunately, we (my department at least) already do this by branching those changes and tracking them in Git, but we're expected to keep our repository names consistent with these conventions too.

This is the reason for my question. I'd like to be able to update our repository names while preserving the old .git URLs somehow.

Is there any way we could do this?

1 answer

1 accepted

1 vote
Answer accepted
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 1, 2021

Hi Jonathan,

I'm afraid that this is not possible.

The URL is generated based on the repository name.

When the name changes, the URL gets updated accordingly.

It is not possible to somehow have a second URL associated with a certain repo.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events