Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upEmpty repo cloning bug #232
Comments
|
Thanks for opening this issue. A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines. |
|
Is this perhaps a misunderstanding of how git works? For instance, when I create a new empty repository on GitHub and clone it. I don't have a local branch, only when I start tracking files does it create the branch. And that branch will be named whatever the I believe the default for git is still |
Maybe you are correct! It is not a misunderstanding of how git works, but it is probably a confusion. |
|
|
|
@janiceilene I would really like this thing to be added somewhere inside the docs as a snippet. |
|
That's definitely something we can consider! Let us know if you find an existing article that makes sense for this update and we can look into it |


What article on docs.github.com is affected?
There is a small bug in cloning an empty repository to the local machine, that has not been included in GitHub documentations.
What is the bug?
Steps to check,
git add .thengit commit -mgit push origin mainIt raises an error because the
mainis not working in case of cloning an empty repo.If instead of
git push origin main, you trygit push origin master, it will work.The bug is - remove the
masterword and replace it withmain, as themasterkeyword has been removed officially while creating an empty repo.Additional information
We may have two solutions,