Move repository without changing URL

My company has a Stash server whose project structure has grown, um, "organically."  We would like to reorganize our projects, but the single problem blocking us is that each project's clone URL includes the project code.

Is there a way to move a repository from one project to another without changing its clone URL?  If not, is there a way to reorganize the project browsing pages in Stash without affecting the clone URLs?  Failing both of those, can a remnant of the project be left behind so that the old URLs will redirect to the new URLs somehow?

If *none* of that's possible, it would be great to configure Stash/Bitbucket to not include the project code as part of the URL from the very beginning, so that this issue could be avoided for future repos.

We're using Stash v3.10.0, installed locally on our servers.

4 answers

This widget could not be displayed.

>Is there a way to move a repository from one project to another without changing its clone URL?  

No

>If not, is there a way to reorganize the project browsing pages in Stash without affecting the clone URLs?

No

>Failing both of those, can a remnant of the project be left behind so that the old URLs will redirect to the new URLs somehow?

You could fork the repo and enable fork syncing, but that seems messy.

The better thing to do is to just reorganize the repos and then change their local remote URLs.

You can do this with the command

git remote set-url origin <new-url>

 

 

This widget could not be displayed.

The URL will be change if you move them between projects and your local remote URLs will have to be updated.

This widget could not be displayed.

Hi Ken,

There's an experimental plugin available that will flush a message to existing users when they try to clone from the old repository location. You'll have to build it from source, but you might find it useful.

cheers,

Tim

This widget could not be displayed.

Persistent URLs are a long outstanding feature-request:

https://jira.atlassian.com/browse/BSERV-3751

You might vote for this as well

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

1,293 views 8 11
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you