Reputation:
Using the basic git commands, when I am in my master
branch, via TerminalBash, I create a new branch (git checkout -b twomics
) and then stage and commit and push, but I do not see the branching in SourceTree. Why is that?
I have attached an image. It does not make a difference whether I choose the All Branches
or Current Branch
tab...
I have had other issues with this (e.g. this post) so I am wondering if it is just me or am I missing something?
Upvotes: 1
Views: 2073
Reputation: 72336
A Git branch is a pointer to a commit. Both branches (master
and twomics
) are clearly visible in the screenshot you posted.
Because twomics
started from master
and master
didn't change its position since you have created twomics
(more exactly, there is no new commit added on master
), a Git graphic client does not have any reason to show divergent branches (as in "tree branches") on the graph.
Your branches did not diverge. All project history included in the master
branch is also included in the twomics
change. master
is an ancestor of twomics
.
The twomics
branch is two commits ahead of master
. Merging twomics
into master
can be done using "fast-forward" because the two branches did not diverge.
A "fast-forward" merge means the target branch (master
here) is pushed forward until it reaches the source branch (twomics
). This type of merge is possible only when the target branch is an ancestor of the source branch (and it is the default type of merge when it is possible).
Upvotes: 2