"git branch" does not show orphan branch names. Why? #396
-
Hi guys!! If someone could help me answer me here, please! My problem is: after installing "oh my bash" on my machine, the command "git branch" doesn't work anymore. Worse: I uninstalled that but the problem persist... Any idea that what's going on here? Any solution? Edit by @akinomyoga The OP has created a new repository and checked out a new branch with $ mkdir Projects
$ cd Projects
$ git init
$ git checkout -b test
$ git branch
$ <-- doesn't show any result |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
How does it fail? Aren't there any error messages? |
Beta Was this translation helpful? Give feedback.
-
An answer to this question (from #396 (reply in thread)): This is the default behavior of Git. The branch in Git is implemented as a tracking reference to a commit. When there are no commits for the branch, it means that the branch has not yet "materialized". The |
Beta Was this translation helpful? Give feedback.
An answer to this question (from #396 (reply in thread)):
This is the default behavior of Git. The branch in Git is implemented as a tracking reference to a commit. When there are no commits for the branch, it means that the branch has not yet "materialized". The
git branch
subcommand doesn't seem to recognize the "branch" that hasn't yet materialized. You can also find a description of the behavior in the following answer to a Stack Overflow question.