发布时间:2025-01-20 13:01
首先需要告诉git你的身份
git config --global user.email "you@example.com"
git config --global user.name "xxxxx"
需要补充github账号注册的邮箱地址以及用户名
git remote set-url origin https://<your_token>@github.com/<USERNAME>/<REPO>.git
git add <dir>
or
git add <file>
git commit -m ""
git push origin master # git push <远程仓库名>:<分支名>
将本地仓库中更新的文件提交到远程仓库,"
如果git push origin master失败,参考【突发】解决remote: Support for password authentication was removed on August 13, 2021. Please use a perso
git remote set-url origin URL # 更换远程仓库地址,URL为新地址
ie. git remote set-url origin git@github.com:Snowleopard-bin/scripts.git
git remote rm origin
git remote add origin url
git remote -v