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

Should I rebase or merge conflicts?

Varun Sreenivas
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 21, 2023

Hello folks, 

What are your thoughts on merging vs rebasing? If I am the only person working on a feature branch, is it okay if I rebase my branch onto main/demo or do you recommend that I merge my feature branch into main/demo instead?

I have read this article here -

Per the article, the golden rule of git rebase is to never use it on public branches. What does a public branch mean? For e.g. - Is the master/demo branch (restricted to a particular team) which is being worked on multiple people considered a public branch

1 answer

1 vote
Ulrich Kuhnhardt _IzymesCo_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
November 21, 2023

Hello Varun,

yes - follow the golden rule, i.e. don't rebase a (public) branch that is visible to others onto _your_ (private) branch.

And, as you are mentioning merge conflicts, even if you follow the golden rule of re-basing, you will still need to resolve conflicts, in case the same files and lines have changed in public and feature branch and git cannot resolve the changes. In fact, previously resolved merge conflicts may appear again if you perform another rebase later.

We use git-merge to resolve merge conflicts, i.e. merge the main into a feature branch, resolve conflicts and commit the feature branch.  

We have published 2 articles in this community that elaborate on git merge and rebase in detail (see links below).

Cheers, Ulrich

// Izymes




Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events