Ubuntu – git branch not showing branches in terminal

command linegit

I'm using Ubuntu 16.04 and Git 2.7.4.

I just did git init and then git branch but nothing appears at all:

~/node/uui$ git init
Initialized empty Git repository in /home/alex/node/uui/.git/
~/node/uui$ git branch
~/node/uui$ 

I'm really puzzled. What could be the problem?

Best Answer

You need to make at least one commit before you can see the master branch listed by the git branch command.