Libon

Git 创建空分支

0 分钟 #git#shell
通过设置 `--orphan` 参数创建空分支

ToC

Terminal window
1
git checkout --orphan <branch-name>
2
git rm -rf .
3
touch .gitignore
4
git add .gitignore
5
git commit -m 'chore: init commit'
6
git push --force

CD ..