gitgithubgit-branchgit-branch-sculpting

Git: Creating branch out another branch showing on main level


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.


Solution

  • 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