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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,466,415
Community Members
 
Community Events
176
Community Groups

How to merge changes to different branches without previous merges

We have two branches

  • develop
  • master

We are working on the "develop" branch with PR. Each developer gets "pull" from the "develop" branch and creates a new branch let's say feature/item-1 and merges back to the "develop" with PR and at least 1 approval rule. This works fine.

After that, we deploy the "develop" branch to our testing servers so the QA team can test if the development is ok or not.

What we trying to figure out: After a branch that is merged, tested, and accepted by the QA, we want to merge this branch into the "release" branch but without getting all the differences between "development" and "release" branches. Right now if we crate the PR "feature/item-1" branch into the "release" branch it includes the past commits from the "develop" branch which we don't want because it includes the commits not tested.

We may use cherry-pick the branch into "release" but and the end of the day we are using bitbucket and there must be a solution, right? :D

1 answer

1 vote
Caroline R Atlassian Team Feb 25, 2022

Hi, @Murat Gür, thank you for reaching out to Atlassian Community.

Usually, when using git/pull requests, we would only merge in branch/commits into the 'develop' branch after it is tested, rather than merging everything into a singular branch to then be tested at that point. This would allow you to only have good/valid commits in the develop branch, meaning that you can then merge from that branch to main whenever you're ready to build/publish the changes as a new version of the application.

To give you some context, with git in general, the idea is to keep branches healthy by only merging once you know content is ready. Merging any commits/branches into a universal testing branch isn't a common practice and isn't something we often see so unfortunately we don't have any tools or common methods to help guide you with your workflow as it exists today (except cherry-pick as you mentioned).

With this in mind, we typically see developers pushing to branches with a specific pattern like "feature/name-of-feature" so that the pattern of "feature/*" can be tested against with the same build/test phase as discussed in this article. I would also like to suggest that you take a look at Git Feature Branch Workflow and check if this workflow could help you and your team.

I hope this helps, but do let me know if you have any questions. 

Kind regards,
Caroline

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events