Branch Discrepancy: "develop" Shows Commits Ahead but No Changes in Source View

Ali Raza December 28, 2023

develop branch shows N number of commits ahead of master on branches page but when I open develop branch for view the changes, it shows message "This branch does not contain any changes — check it out on your local machine to do some work."
but in the commits section it shows 10+ commits.

 

Note: I merge my Pull Requests using Squash Strategy.

2 answers

1 vote
Harut Avetisyan December 28, 2023

Dear @Ali Raza

1. It's possible that the commits on the develop branch are not yet merged into the master branch. The "N number of commits ahead" indicates unmerged changes. Check if there's an open pull request or if you need to merge the changes manually.

Check for any open pull requests related to the ”develop” branch.

  • If you find an open pull request, review its status and consider merging it if it's ready.
  • If there isn't an open pull request, it's possible that changes on the “develop” branch need to be manually merged into the “master” branch.

2. The tool you're using to view changes may not support visualizing squash merge histories effectively. Try using “git diff” or “git log”

 

Kind regards,

Harut

Ali Raza December 28, 2023

@Harut Avetisyan thanks for your help, but problem is not solved. below are the more details

  1. there is no open pull request.
  2. using git log origin/master I found that the all commits made in develop are also merged into master (I found last commit (PR#469) of develop in the commit history of master using above mentioned command, which means it is merged into master)

    then why it is showing me that the develop is 119 commits ahead of master.p1.PNGp2.PNG
0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 29, 2023

Hi Ali,

The explanation for this behavior is similar to the other question of yours I replied to earlier:

https://community.atlassian.com/t5/Bitbucket-questions/Despite-the-merge-the-develop-branch-displays-as-N-commits/qaq-p/2567283#M100378

If master is your repo's main branch, the Ahead count for develop will show the number of commits that exist on develop and are not reachable from the head of master branch.

If you merged develop into master with squash, the changes were merged into master. However, the commits of develop that you merged with squash still exist on develop and they are not reachable by the head of master branch.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events