1. 新建一个仓库比如tmp
2. 获取personal access tokens
官方手册:
https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token
3. git 命令
第一次
git clone https://github.com/xxx/tmp.git
git add .
git commit -m "first commit"
git remote #查看分支名
git push origin
第二次
git pull
# modify
git add .
git commit -m "second commit"
git push origin
添加现有项目至远程仓库
cd [现有项目文件夹]
git init
git add .
git commit -m "xxx"
git remote add origin https://github.com/xxx/tmp.git
git fetch <remote> # git fetch origin
# modify
git add .
git commit -m "first add"
git push <remote> <branch> # git pull origin main