Craig Silver Craig Silver - 23 days ago 13
Git Question

Understanding graphical representation of Git Extensions Branches

Coming from SVN, I am still getting used to the complexity of Git. Having discovered first hand that TortoiseGit is just asking for trouble, I am also discovering Git Extensions.

As I have done in the past, I managed to work on three separate tasks before finishing any of them--not so wise, I know. It lets me practice branching though, that's for sure.

I now have three branches in addition to

master
:
thread-safe
,
common-create-web-request
and
change-alias-target
. At this point, nothing is unstaged, all changes are committed to one of those three branches (or so I thought, see next paragraph) and none of them has been pushed or merged.

I am just curious, and a little concerned, that the Git Extensions Browse window seems to show graphically that, although the revisions to the branches
thread-safe
and
common-create-web-request
are on those branches, the two revisions to the branch
change-alias-target
are not (I am looking at the graph running up the left side of the list of revisions). If I mistakenly committed them to..
master
? then I guess I need to know how to move them to the branch
change-alias-target
, please.

enter image description here

Answer

The 2 commits are in the branch 'change-alias-target'. Branches in git are pointers that handle a chain of commits. So, if you could see a commit, that's because they are contained in all the branches (the red tags) that you will encounter when following the lines going up.

You could also see in the commit tabs, once you click on its corresponding line, all the branches it is contained in. The list is displayed after the commit message...