Why doesn't the graph display a new branch branching off from the master branch, when I create a new branch in terminal?

Why doesn’t the graph in Sourcetree display a new branch branching off from the master branch , when I create a new branch called “testing123” in terminal ?

Sourcetree recognises the new branch but it doesn’t branch off from the master branch in the graph. Why is this happening ? How can I make Sourcetree graph display the new branch branching off from master?

  • Is it possible in SourceTree commit only one “hunk” of changes?
  • Git: cannot do a partial commit during a merge (SourceTree)
  • SourceTree very slow with many repositories
  • Sourcetree does not launch Beyond compare external merge tool
  • SourceTree keeps asking for Github password
  • How to do git cherry-pick --continue in SourceTree?
  • enter image description here

  • Is it possible to show if git branches have the same commits if the one of the branches has been rebased so they don't have the same SHA1 IDs?
  • Git merge with commit via cherry-pick
  • How to move files from one git repo to another (not a clone), preserving history
  • Git checkout in post-receive hook: “Not a git repository '.'”
  • How to recover from a git push -force?
  • Collaborating on Android Studio Project using git
  • 2 Solutions collect form web for “Why doesn't the graph display a new branch branching off from the master branch, when I create a new branch in terminal?”

    It does: it has one new commit done from master.

    That means you have checked out the new branch testing123, done one commit and pushed it (hence origin/testing123).

    You don’t see any “branching” because there is no new commit on master since testing123 has been created: the history of testing123 remains “linear” with the one of master.

    Once a new commit will have been created on master, you will see a fork.

    See also this thread on SourceTree:

    2 possible reasons for this:

    1. You have ‘Current Branch’ selected at the top of the log view, or
    2. The branches didn’t actually cause a divergence in the graph.
      A branch is just a marker, unless different commits actually occurred in each that were not shared between then, there won’t be a fork in the graph.

    This is actually a genuine issue if the purpose of GitFlow is to be intuitively informative. If I do an initial commit followed by branch develop, and branch feature1 (as in Vincent Dreissen’s A Successful Git-Branching Model) GitFlow depicts this as a linear chain o-o-o when in fact it should be a branching chain

        o [feature1]
      o [develop]
    o [master]

    with links in different colors, blue pink, and yellow, to indicate that these are three separate branches. Now GitFlow does “fix” this problem when you eventually merge develop and feature, and then merge master and develop, but until you do those merges the graph looks much different than what you are conceptualizing.

    Can there be an option to make different branches appear in different colors? Because the original questioner’s point is right – the master and test123 branches appear in a single line of a single color. That is actually not quite right, and is very confusing to the noobie.

    Git Baby is a git and github fan, let's start git clone.