在 GIT 中创建一个空分支

一、创建一个空白分支

git checkout --orphan <new_branch>
git rm -rf .

二、首次提交并推送到远程服务

echo > .gitignore
git add .gitignore
git commit -m "first commit"
git push origin <new_branch>
文章作者: 若海; 原文链接: https://www.rehiy.com/post/131/; 转载需声明来自技术写真 - 若海

添加新评论