Forums

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

Is there a way to hide/discount merge commits?

Bojack_Codeman
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 17, 2020

Hello,

 

I am looking for a way to hide/discount merge commits so they:

  1. Will not be messing up the commit graph when I develop features in Dev and then merge Dev -> Test -> Prod. When I do the Dev -> Test -> Prod merge the commit graph is adding a line for every merge (e.g. first Dev -> Test, then first Test -> Prod, then second Dev-> Test, then second Test -> Prod, etc.)
  2. Will be discounted from the Behind/Ahead commit count, otherwise it creates an impression that Test or Prod have commits that are not in Dev for some reason.

Is there a way to achieve any of the above?

1 answer

1 accepted

1 vote
Answer accepted
Mikael Sandberg
Community Champion
March 17, 2020

Hi @Bojack_Codeman,

Welcome to Atlassian Community.

There is no option in Git to exclude merge commits when doing a merge. You only option right now in Bitbucket is to use a merge strategy that do not create the merge commit, like Fast-forward only or Rebase fast-forward. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events