1、新建仓库后上传代码:
git clone https://github.com/xx.git
git add .
git commit -m "xxx"
git push
2、上传分支代码
先在仓库页面创建好分支
更新分支创建好的分支:git fetch origin
切换分支:git switch 分支名
查看当前分支:git branch
执行第一项里面代码上传步骤
2、代码备份
git clone --mirror https://github.com/xx.git
cd xx.git
git push --mirror https://github.com/xx.git