Reputation: 41
If I do "git branch -a" in my terminal, does a branch of a branch (so a branch I made off of another branch) look different from a branch off of origin? For example, if I have a branchB off of branchA, should the branch look like: origin/branchA/branchB?
Upvotes: 2
Views: 38
Reputation: 1323343
The reasons branchB
does not appear as branchA/branchB
are:
that would imply some kind of strong coupling between branchA
and branchB
, which makes no sense considering:
branchA
can be deleted at any time (that won't delete the commits it referenced): branchB
would still be there, unchangedbranchB
can be rebased at any time on top of any other branchbranchB
has no knowledge of any other branch it is "based" upon: it only references a commit (and all commits reachable from its HEAD)a slash is allowed in a branch name: you can name it xxx/yyy
(as one branch): this is for defining a hierarchy in a branch naming convention.
Typical examples:
refs/for/REL1_20/bug/36151
: the for/REL1_20/bug/36151
is one (Gerrit) branch.git fetch origin pull/ID/head:BRANCHNAME
: pull/ID
is one (PR) branchUpvotes: 2
Reputation: 239722
No.
Unless you name it that, anyway. All that is displayed is the branch's name, which can be anything you want.
Upvotes: 2