When I work with GIT branches my "mental model" of any given branch is that it is a path which breaks out from the branch which I base that branch on. Let's assume I do the following :
git checkout develop
git checkout -b feature/1
touch README.md
git add --all
git commit -m "Added README.md"
git push -u origin feature/1
git checkout develop
git merge feature/1
git push
Now, I would expect a git GUI to visualise this by drawing a develop
branch as a separate path. Then, from the develop
branch path I would expect to see a feature/1
branch path break out from the develop
branch path. I would then expect to see the two paths go alongside each other, until i merge feature/1
into develop. At this point I would expect to see the feature/1
branch path merge back into the develop
branch path.
However, when I only work at a single branch at any given time (in addition to the develop and master branch which are always there) - this is not what happens. If I begin work on a new branch, finish the branch and merge it back into develop, it all seems to take place on the same "path". However, when I work on two branches at the same time it seems that one of the branches breaks out on its own path. However, the first branch is just visualised as a continuation of the develop branch.
I find it confusing that only one of the branches are visually represented with its own path, while the other is just represented as a direct continuation of the develop branch. Am I getting this wrong - or thinking about branches wrong? I just want to get a clear and consistent view of when I broke a new branch out of develop and when i merged it back in again. In my opinion, having a separate path for every branch created would make this easier to get.
Is there a GIT client out there which does this? Or do I need to look at this differently?