为了账号安全,请及时绑定邮箱和手机立即绑定

mac下git无法提交代码

mac下git无法提交代码

Git
SMILET 2018-07-24 12:42:38
私有服务器搭建的环境,先clone下来了git add .git commit -m "提交"git pushxxx@xxx.xx.xxx.xxx's password:To 47.92.137.186:/xx/xx/xx.git ! [rejected]        master -> master (non-fast-forward)error: failed to push some refs to 'xx@xxx.xx.xxx.xxx:/xx/xx/xx.git'hint: Updates were rejected because the tip of your current branch is behindhint: its remote counterpart. Integrate the remote changes (e.g.hint: 'git pull ...') before pushing again.hint: See the 'Note about fast-forwards' in 'git push --help' for details.就这样了...第一次提交就这样的!!...一直用的一个公钥!!!
查看完整描述

2 回答

?
慕容3067478

TA贡献1773条经验 获得超3个赞

好好看看错误提示

hint: 'git pull ...') before pushing again.

先git pull ,再 git push


查看完整回答
反对 回复 2018-07-27
?
智慧大石

TA贡献1946条经验 获得超3个赞

原因是node_modules这个文件夹和文件夹里面的内容不能提交!!

查看完整回答
反对 回复 2018-07-27
  • 2 回答
  • 0 关注
  • 895 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信