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

>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>

 

 

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

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

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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

1,931 views 1 5
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