Q:

Why does our Git-Tree look so messed up

the following picture is showing a part of our current Git-Tree.
What we dont really understand is how it keeps getting so messed up.
Keep in mind that this is all one branch, the lowest node being the 'main-master-node' and the other nodes are also on the master-branch but still they look like they are different branches.
We are using Visual Studio 2017 and the TFS for Git.
We are getting totally confused by this and need to always check thrice to see if it is the master-branch or a different one.
Are we doing something wrong or is it normal like this for everyone?

A:

There is a master branch on the remote repository. Bob clones the repository and works and commits on his local master branch. Eve also clones the repository and works and commits on her local master branch. She's pretty quick, so she pushes her commits to the remote repository; the remote master gets updated with her commits. When Bob finally finishes what he did, he cannot just push to the remote master branch, since he diverged: he has commits on his master that the remote has not, and at the same time the remote has commits that Bob's master has not (those from Eve).
What now? Bob can either merge his master branch into the remote master branch, making his commits available by creating a merge commit that "unites" both branches, or he can rebase his local master onto the remote master. The latter will put his own commits on top of the remote masters commits, as if he would have commited after Eve's changes were already incorporated.
The details of this process depend on your git server management tool of choice, and I can't say anything about TFS, but this is why it is necessary to either merge or rebase, even when you all work on the master branch.

