【git基础】git创建空白分支

发布时间 2023-03-27 18:41:29作者: 鹅要长大

前言

 

cmd

git clone git@gitlab.xxx.ai:rrr/traffic_light_detection.git
cd traffic_light_detection
git branch -a

git checkout --orphan newbranch
git rm -rf . 
echo '# new branch' >> README.md
git add README.md
git commit -m 'new branch first commit'
git push origin emptybranch
View Code

参考

1. git创建一个没有历史记录的空白分支_idea git分支不带历史记录_欲饮琵琶码上催的博客-CSDN博客