上传本地文件到git
在项目目录下进行
git config --global user.name "Chen"
git config --global user.email "666999@qq.com"
git init
git add .
git commit -m "微信小程序的第一次提交"
git remote add origin https://github.com/Jiage666/Jiage_666.git (仓库的地址)
git push -u origin master
如果报错,强制性提交
git push -u origin master -f 强制提交
更新文件到git
>git config user.name "用户名"
>git config user.emia "邮箱"
>git add .
>git status //查看状态
>git commit -m "备注信息"
>git pull origin master
>git push origin master
详细讲解参考自:https://www.cnblogs.com/jet-angle/p/12667975.html
可能出现的错误
(1)git@github.com: Permission denied (publickey). fatal: Could not read from remote repository
解决方法:https://blog.csdn.net/weixin_44394753/article/details/91410463