error: switch `m' requires a value

error: switch `m' requires a value 

错误:开关“m”需要一个值

 

解决方法:

输入 git status 后会出现以下

On branch master
Your branch and 'origin/master' have diverged,
and have 1 and 2 different commits each, respectively.
  (use "git pull" to merge the remote branch into yours)

意思是(使用“git pull”将远程分支合并到您的分支中)


All conflicts fixed but you are still merging.
  (use "git commit" to conclude merge)

意思是(使用“git commit”结束合并)

 

Changes to be committed:

        modified:   index.html

Changes not staged for commit:


  (use "git add <file>..." to update what will be committed)

  意思是(使用“git add<file>…”更新将提交的内容)


  (use "git checkout -- <file>..." to discard changes in working directory)

  意思是(使用“git checkout——<file>…”放弃工作目录中的更改)

        modified:   index.html

我的解决方案是 git add index.html

结束合并 git commit -m "modify"

把服务器代码拉下来跟你本地代码合并  git pull

把合并好的最新代码推送到服务器端     git push​​​​​​​

2019.7.11

  • 4
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 10
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 10
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Izrj

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值