Reputation: 65
I typed the command from the prompt-
G:\new-git-project>git init
After that the prompt says-
G:\new-git-project\.git\
But it doesn't give indication of the master branch created.The expected result should have been-
(master#)G:\new-git-project\.git\
Where is the error?
Upvotes: 1
Views: 56
Reputation: 25383
Your command prompt is not specifying the master
branch because you have only created your repo...it doesn't yet have any commits for a branch to point to.
After your git init
you can create an initial empty commit like this:
git commit --allow-empty -m 'Initial commit'
Upvotes: 0
Reputation: 12174
You need to clone a git project first. Refer to the tutorial here.
$ git init
$ git clone https://github.com/your/repo.git # Sets master -> origin/master
$ git branch -r # shows origin/master
For newly created/empty repos,
$ git add .
$ git commit -m "commit message"
$ git push -u origin master
Upvotes: 1