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

Why do merges of pull requests not display anything in the graph?

James Smith December 5, 2017

Why do merges of pull requests not display a line in the graph, showing the merge? We know what branch is being merged in, it's right in the pull request, but yet the graph shows no line connecting them back into one line??? It just looks like all branches never got merged in, but they did? Who decided this was the way to display the graph?

 

Untitled.png

2 answers

2 votes
minnsey
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 8, 2017

Hi can you check you have the 'Show Remote Branches' option checked at the top of the log view?

Is it possible that the PR has been merged but you are not seeing the remote state and you haven't fetched since the PR merge?

James Smith December 11, 2017

It is checked.

How can I have not fetched from the remote if I can see the commit where the branch is being merged?

minnsey
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 15, 2017

Apologies, i confused 2 issues.

Can you let me know whether changing the Current/All branches option and the Show Remote Branches option changes the view?

James Smith December 15, 2017

I don't understand your question, it was mis-written and confusingly worded. 

If you are asking whether toggling Current/All Branches and unchecking and rechecking Show Remote Branches does anything to resolve this problem: the answer is no.

minnsey
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 15, 2017

Sorry for any confusion, thanks for the answer.

Can I ask what the graph looks like when you run

>git log --oneline --abbrev-commit --all --graph

Do the lines join in that?

kyledelaney
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 1, 2019

Hey, I know this is an old question, but I'm experiencing this problem and I'd like to give some input. I'm not a Git expert so I'm going to need some help piecing this together.

In SourceTree, when we merge a branch locally the merge itself has its own commit. In the branching graph, each commit is a node connected by colored lines. So for two lines to merge together they need to merge at a commit, and this would be the merge commit, conventionally with a description like "Merge branch A into B."

Pull requests in GitHub seem to be handled kind of differently. When a pull request is "merged" there's no merge commit. It seems to just use the commits in the pull request to make new commits on the master branch. I'm not exactly sure what's going on, but this seems to produce unexpected behavior.

I ran the command ">git log --oneline --abbrev-commit --all --graph" and found the commit I was looking for in the output, and it's the same as SourceTree's graph. But I noticed something about the graph that I had missed before. There are two copies of my commit: one in its own branch that's never been merged, and one in the master branch which must be where the pull request was "merged." What's going on here? Why is the PR showing up as a direct commit to the master branch rather than a branch that's been merged? Is this expected behavior, or is someone merging pull requests incorrectly?

minnsey
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 4, 2019
Like kyledelaney likes this
rainfarm
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!
November 6, 2019

This is a good question, ive been wondering this for awhile.
It's much harder to follow the branching history when it does not display any connections on the git graph.
Anyone find a solution?

abarber
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 6, 2020

I am having the same issue. the merge worked, but the graph does not reflect the merged branches.

mariomail
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!
June 3, 2020

The same issue. Waiting for some help.

William Young
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!
October 20, 2020

Same issue, where is the answer???

npolidorifm
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!
January 12, 2021

I'm facing the same problem and it seems to be caused by the way you merge the pull request.

I'm using Azure DevOps and when i close a pull request i can choose between a regular merge and a squash merge.

Example of a regular merge from a pull request

 

Squash Merging in pull requests in Azure Repos

A squash merge takes all the changes in the pull request and create a single commit on the target branch. In this scenario history of the merge is lost.

I think that's why SourceTree does not show the 'merge line'

Like # people like this
Albert
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!
June 1, 2021

This is exactly what I'm experiencing. if we use "merge" in GH, sourcetree graph appears as expected. but using squash merge, we get the issue.

I think it goes beyond the graph, sourcetree truly believes the branch is not merged. when i verify that branch is merged, and want to clear it from my local branches using delete, sourcetree warns me that the branch is not merged, i have to force delete it. 

is there anyway to get sourcetree to recognize GH squash merge as a merge?

Like # people like this
0 votes
thecargocult
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!
July 9, 2023

Same problem here. Very annoying. IS there any suggestion from Atlassian about how we could resolve this? 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events