##协作
#协作
$ git clone https://github.com/wing21/testfile.git #http地址
$ cd testfile
$ mkdir anewfile
$ git add anewfile
$ git commit -m "anewfile"
$ git branch -M main #当前本地分支名称修改为main
$ git push -u origin main
##独自创建
git init
git add .
git commit -m "first all"
git remote add origin git@github.com:wying21/testfile.git
git push -u origin main
git remote add wy git@github.com:wying21/secondfile.git # ssh 地址
git remote #列出所有远端仓库名字 origin & wy
git remote remove wy #删除wy对应的远端仓库
git remote
1.分支是文件夹。文件夹并列则分支并列。文件夹包含则分支包含。
2.git push pull 都得指定仓库origin指定分支main。不指定的话则在当前所对应的分支上。
3.ssh公钥
ssh -keygen
#连按两个enter键生成公钥
cd ~/ #回到根目录
cd .ssh/
cat id_rsa.pub #查看公钥内容,粘贴到GitHub的settings的ssh新添上。