Git init did not create master branch

2

I'm trying to give git init to my project, it returns successfully:

Initialized empty Git repository in C:/myprojetPath/.git/

But because when I type git branch , it does not return any branches?

$ git branch

(Não retorna nenhum branch)
myuser@WKS054 MINGW64 myprojetPath (master)
$

But in my terminal (Git bash, actually) it shows that I am in the master branch.

But when I change the branch, I can not go back to branch master with git checkout master , it informs that the branch does not exist

    
asked by anonymous 14.03.2016 / 17:02

1 answer

1

It seems that when you have just created a repository this is common.

I made some tests here and only the branch appears when I did the following:

git init
touch um_arquivo_incial
git add um_arquivo_inicial
git commit -am "Primeiro commit"

Then, if you do git branch , then you will see:

 >*master
    
14.03.2016 / 17:09