别着急,坐和放宽
要在当前仓库创建一个不包含任何文件的新分支,可以使用以下Git命令:
git switch
<!--more-->
--orphan <new-branch-name>
git commit --allow-empty -m "Initial commit"
这两个命令的解释:
git switch --orphan <new-branch-name>:
git commit --allow-empty -m "Initial commit":
执行这些命令后,你将得到一个全新的、不包含任何文件的分支。