mac下git无法提交代码

  1. 私有服务器搭建的环境,先clone下来了

git add .

git commit -m "提交"

git push

xxx@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 behind

hint: 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.

就这样了...
第一次提交就这样的!!...
一直用的一个公钥!!!

SMILET
浏览 899回答 2
2回答

慕容3067478

好好看看错误提示hint: 'git pull ...') before pushing again.先git pull ,再 git push

智慧大石

原因是node_modules这个文件夹和文件夹里面的内容不能提交!!
打开App,查看更多内容
随时随地看视频慕课网APP