Trying to figure out optimal setup for Stash projects / repositories

Nils Brasz February 20, 2014

Hey all,

Not sure if this is the correct palce to ask, but I am relatively new to Stash/Git in general and was looking for some advice on how to setup a heirarchy of repositories in a project for development vs production environment.

I currently have a website that lives duplicated in two places, live and dev. and we make changes on dev, then migrate them to the live version after testing. Both environments are available to the web but the place the dev code lives triggers some flags in the code to keep it from being public.

What I have tried to do is setup a Project for the site, and there in have two repositories, live and dev. Me and other developers fork the dev repo and clone it to our local machines where we work on changes, commit them, and push them up to the fork. then we pull request them back in to the dev repository. After that we have Bamboo to basically do git pull on the dev repo, and our changes are now live in the dev environment.

My question is though, how can we migrate these two the live repo as i see no way to pull request across these two repositories (maybe i set them up wrong as they werent initially created as forks? iam not sure)

Can anyone provide insight as to how to set things up or where to look for some tutorials on how to manage/setup optimal environments that have two areas that code lives live and staged to the web.

Thanks a ton in advance for any tips!

Nils

1 answer

1 accepted

1 vote
Answer accepted
cofarrell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 20, 2014

Hi Nils,

Stash only allows pull requests to be created within a single "hierarchy" of repositories - which means you need to fork. You should be able to fork off of the production repository and push your development branch if you need to.

Personally I wouldn't bother forking at all, and have all your branches live in a single repository. Is there any need for the branches to be split up like that? You can certainly keep buliding and deploying them in the same way, but it's usually more convenient to have one repository.

Cheers,

Charles

Nils Brasz February 21, 2014

Thanks Charles,

Your insight has provided me wit ha solution! I look forward to getting more accustomed to Git, and thanks to you I now have a first step towards that. :)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events