Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to completely disable this auto Merge?

FinAdmin
Contributor
September 9, 2019


We are repetitively facing issues with 'auto merging' , none of us are doing 'commit merge' , yet the commits history is showing that the merge is happening a lot, check below screenshot:

image.png

 

How to completely disable this 'feature' ?  Is it possible to completely turn it off? I read that it's disabled by default and we never enabled it, yet it's happening! 

 

PS: I am using VS Code

1 answer

1 accepted

1 vote
Answer accepted
Mikael Sandberg
Community Champion
September 9, 2019

Hi @FinAdmin,

Welcome to the Atlassian Community.

Those are not auto merges. Automatic branch merges happens when you do a pull request and have enabled it, and I believe it is only available on Bitbucket Server.

What you are seeing are merges from the master branch into the branch you are working on. This happens when you do a pull. A pull is basically a fetch and a merge combined. 

FinAdmin
Contributor
September 9, 2019

Hi Mikeal, thanks, 

but I am working only on one branch, which is the master, so how is that possible?

Mikael Sandberg
Community Champion
September 9, 2019

Are you the only one working in the repository? 

FinAdmin
Contributor
September 9, 2019

No, there's a 2nd person, why?

Mikael Sandberg
Community Champion
September 9, 2019

So that explains the merge commits on the master branch. So when you do a pull from the remote, Git will do a fetch and a merge, and in most it will just be a fast forward. But because you have more then one person working on the same branch you will end up with different versions of the repository, and the only way for Git to solve that is to do a merge.

Lets look at an example from one of my repositories. Both developer KP and VN are working on the same branch. Developer VN makes a change to a file, and at the same time developer KP makes a change. In this case KP commits and pushes his change back to Bitbucket first. VN then pushes his change and KP is then doing a pull which will merge VN's changes into KP's clone of the repository.Bitbucket.png

FinAdmin
Contributor
September 10, 2019

this is exactly what i am seeing on our bitbucket, so the pull command sometimes merges stuff on the cloud source itself?

FinAdmin
Contributor
September 10, 2019

However in our case, me and coworker never touch the same files, it is a policy that you follow; yet it merged files that one of us never touched. And I don't understand why.

Mikael Sandberg
Community Champion
September 10, 2019

It doesn't matter if you are making changes on the same file or not. Once one of you start making a change and committing it, there will be a difference between your copies of the repositories and it needs to be merged so you all have the same history of the repository. In most cases Git will just do a fast forward, meaning no merge is needed, but sometime a simple fast forward will not work and that is when a merge happens.

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events