7.直接使用git push 报错fatal: The current branch main has no upstream branch. To push the current branch and set the remote as upstream, use git push --set-upstream origin main(当前分支(main)要推送到长途的哪个分支)
解决:git push --set-upstream origin main
把当前分支 main 推送到长途仓库 origin 的 main 分支,并记住这个绑定关系
Everything up-to-date
Branch 'main' set up to track remote branch 'main' from 'origin'. 绑定成功
后续就可直接使用git push
8.git add . 添加全部改动到暂存区(stage),才能后续commit到 本地仓库
9.git commit -m "同步到本地git仓库" 将暂存区同步到本地git仓库