1、新建倉庫后上傳代碼:
git clone https://github.com/xx.git
git add .
git commit -m "xxx"
git push
2、上傳分支代碼
先在倉庫頁面創(chuàng)建好分支
更新分支創(chuàng)建好的分支:git fetch origin
切換分支:git switch 分支名
查看當(dāng)前分支:git branch
執(zhí)行第一項里面代碼上傳步驟
2、代碼備份
git clone --mirror https://github.com/xx.git
cd xx.git
git push --mirror https://github.com/xx.git