1

I have created a new branch out another branch:

master ---develpment ---------FeatureA

But if I check the branch structure it shows FeatureA branch at the same level as develpment:

 git branch -a
  development
* FeatureA
  master
  remotes/origin/development
  remotes/origin/FeatureA
  remotes/origin/master

My question to guys is guy FeatureA is not showing as sub-branch of development?

I'll really appreciate your help.

user2924482
  • 8,380
  • 23
  • 89
  • 173

2 Answers2

2

There is no such thing as a "subbranch". All branches are equal. But you can use different tools to view relations between branches. Try

git show-branch
git log --all --decorate --graph
gitk --all
phd
  • 82,685
  • 13
  • 120
  • 165
1

In git, branches are just pointers to commits. After a branch is created, it does not remember from which branch it was created (in fact, a new branch is not necessarily created from any other branch, it can be created from any arbitrary commit) and has no relation to other branches.

See corresponding chapter in a git book.

There are various GUIs that can help you visualize the repository tree and relation between commits and branches.

Ilya Popov
  • 3,765
  • 1
  • 17
  • 30