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

前言

 

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博客

 

 

posted on 2023-03-27 18:38  鹅要长大  阅读(108)  评论(0编辑  收藏  举报

导航