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

Bitbucket commit view of branch shows commits prior to branch creation

Steve Muskiewicz September 4, 2013

Hi,

I'm looking at the Bitbucket commit history page for a particular branch of a repository that was originally converted from Subversion. Since I have the specific branch name selected from the menu, I would expect that the view of the branch would stop at the first commit where the branch was created (from the trunk of the original SVN repo). Instead, the view keeps going with all the original trunk commits that occurred prior to the creation of the branch. Additionally, the graph to the left is the same color (green) for all commits both on the branch and prior to it.

The branch/tag name "blocks" to the right of the commit message are correct and stop at the first commit on the branch, but I guess I was expecting that the history view itself would stop there and not include commits prior to when the branch was created.

I did a quick test with a brand new repo, created a master branch and pushed some commits. Then I created a "test-feature" branch, made some changes and pushed. When I look at the commit history in Bitbucket and select the "test-feature" branch, I see *all* of my commits from the original master and not just the commits from the "test-feature" branch.

Is this expected behavior or a display bug?

thanks,

-steve

Update: I found that if I merged the "test-feature" branch back into master, then the graph color changes in the commit history view and shows bright green from the commit where the branch was originally created onward. Prior to that the commits are shown in a different color.

So it would appear that for cases where the branch has not been merged back into another branch is when the graph color does not change. Maybe this is expected behavior but it would be a nice visual indicator for exactly when the branch got created if the color of the graph could change at that commit point.

1 answer

1 accepted

1 vote
Answer accepted
aMarcus
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 8, 2013

Steve,

The behavior you are seeing is expected. When you branch off of a point, your new branch includes all the commits up to that point. You are then creating a new line of work based on that point. We intentionally show you that these commits are ancestors of your new branch because they indeed are.

The line colors should correspond to branches as they are created and eventually when you merge, the line is shown combining them. You can produce the same/similar graph using the following command

git log --graph --color=auto

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events