2

I create a new branch with git checkout -b "branch_name" I would expect to see this branch when I run git branch -a: But I see no results, any ideas what could be causing this?

git version 2.36.1.windows.1

enter image description here

2 Answers 2

3

This is a completely empty repository; that is, it contains no commits. Therefore you are in the curious position of working with what is usually called an unborn branch. You are allowed to create the branch name so as to dictate what branch you will be on when you do create a commit. But until then, the branch is unborn and is not listed in your git branch output.

Sign up to request clarification or add additional context in comments.

Comments

2

This might happen if you have no commits in the branch.

1 Comment

More exactly, if you have no commits at all.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.