github 同步操作

https://blog.csdn.net/qq1332479771/article/details/56087333

https://blog.csdn.net/weixin_34613450/article/details/82182987

https://blog.csdn.net/u011976443/article/details/80299957

本地有更新,上传到github仓库:

    用git remote查看远程主机状态

git remote -v
git remote add upstream git@github.com:××/xxx.git(源)

git remote -v
git fetch upstream  #从仓库源更新同步代码
git merge upstream/master #合并到本地代码  (先提交才可以。第一次要邮件等

git pull origin master #更新合并自己远程仓库的代码(将你本地的仓库提交到你的github账号)

git push   #向自己远程仓库推送刚才同步源仓库(输入用户名密码)

*、状态查询命令

本地上传,提交项目:
1.git init,使Test文件夹加入git管理;
2.git add .(不要漏了“.”),将Test文件夹全部内容添加到git。
3.git commit -m "first commit"(“git commit -m "提交信息"”)
4.git remote add origin https://github.com/shench5612390/Test.git”(git remote add origin 你自己的https地址),连接你的guthub仓库。
5.输入“git push -u origin master”,上传项目到Github。这里会要求输入Github的账号密码,按要求输入就可以。

git merge upstream/master

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

即git config --global user.email "lff145536@.com"

git config --global user.name "my-hello-world"

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值