git init --bare test-repo.git
cd test-repo.git
(文件夹中包含与git相关的文件和文件夹)
git status
致命错误:此操作必须在工作树中运行 (好的,所以我不能在裸库中使用git status;我猜这很有道理)
git branch
(似乎什么也没有,裸库似乎不包含任何分支。我是否需要从克隆的库中添加它们?)
cd ..
mkdir test-clone
cd test-clone
git clone ../test-repo.git
(我收到有关克隆空代码库的警告)
cd test-repo
提示改变以指示我正在主分支上。
git branch
(没有显示结果 - 嗯?)
git branch master
致命错误:无效的对象名称:“master”
嗯,那么我该如何在我的裸仓库中创建主分支?