Perhaps you could also try:
gitGraph:
options
{
"nodeSpacing": 150,
"nodeRadius": 10
}
end
commit
branch newbranch
checkout newbranch
commit
commit
checkout master
commit
commit
merge newbranch
Note:
This is experimental mermaid but it seems to display OK results.
Hope it fits your original question