How to reorder a hierarchy of Projects in stash


We work at 3 Projects at the same time, one being the template system of the other two. After some months of back and fore we decided that the initial setup does not fit the situation as good as we would like, therefore we want to reorder the projects.

Status Quo: T is the ancestor of both A and B

Should be changed into: T is the ancestor of A, and A ist the ancestor of B

Since all Projects have a common history, its possible to push/pull commits between them. So in a pure GIT world it should be possible to change the definition of upstream and downstream for every repository. 

But how can this be done with Stash v2.12.1?

Best regards,

Andreas Sliwka

1 answer

0 votes

Hi Andreas,

When you say Projects, I think you mean repositories? And if I understand correctly, you currently have 3 repositories:

  • T ('template')
  • A - fork of T
  • B - fork of T

and you want to change that to:

  • T ('template')
  • A - fork of T
  • B - fork of A

Please correct me if I misunderstood your situation.

As you said, because all three repositories have a common ancestor, you can freely push/pull commits between them. Stash also allows you to create pull requests between any two repositories in the same 'family', so in your case you can already create pull requests between A and B without having to change the hierarchy.

Is there specific functionality that you're missing that triggers you to want to change the hierarchy?

If you do want to change the hierarchy, you'll have to delete repository B and recreate it as a fork of repository A. 

Note however that this means that all your pull requests from repository B and the comments in them will be lost when you delete repository B. An alternative might be to rename repository B to B_archived and then recreate B as a fork of A.

Hope this helps!



Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

678 views 5 9
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