git init --bare test-repo.git
cd test-repo.git
(文件夹是用 git-ish 文件和文件夹创建的)
git status
致命:此操作必须在工作树中运行 (好的,所以我不能将 git status 与裸仓库一起使用;我猜是有道理的)
git branch
(没什么,看起来裸仓库不包含任何分支。我必须从克隆的仓库中添加它们吗?)
cd ..
mkdir test-clone
cd test-clone
git clone ../test-repo.git
(我收到有关克隆空存储库的警告)
cd test-repo
(提示更改以指示我在 master 分支上)
git branch
(显示没有结果 - 嗯?)
git branch master
致命:不是有效的对象名称:'master'
嗯。那么如何在我的裸仓库中创建主分支呢?