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

Stash: Merge two branches regularly

Subramanian Olagappan December 25, 2013

I have a dev branch created from master and I would like to setup a regular daily merge between these two branches or whenever a commit is done in master branch. How can I do this in stash, or should I write sctipts to merge two branches.

2 answers

1 accepted

0 votes
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.
December 25, 2013

Hi Subramanian,

There isn't currently a way to do that in Stash. Personally I would use a CI server like Bamboo/Jenkins to schedule a script that merges the two and pushes back to dev.

That said, have you seen the Stash Automerge feature, although I'm not sure it works between the dev/master branches. Generally if you have two master branches that you need to keep in sync the upstream branch should _always_ contain all changes from the downstream. In this case if you're making changes in master that need to be in dev it should be the developer who made the changes that should have to deal with the conflicts, not someone in charge of the daily build.

Does that make sense?

Charles

0 votes
Subramanian Olagappan December 29, 2013

I am evaluating stash and currently we are pulling all the commits from hg to git ( master branch ) and then get it merged to dev branch , where we have done local changes to get it built using CI tool. Right now I create a pull request and merge those two branches ( ideally there is no conflict ).

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events