上传和更新本地文件到git

上传本地文件到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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值