由于使用git版本不一样,pull代码是不会报错的,但push 就会报错,如下:
warning: push.default is unset; its implicit value is changing in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the current behavior after the default changes, use:
git config --global push.default matching
To squelch this message and adopt the new behavior now, use:
解决办法:
1.X版本,执行 git config --global push.default matching
2.X版本,执行 git config --global push.default simple
版本冲突
Git push 报错 "error: failed to push some refs to " 解决
先git pull
再git push
执行到这步,又报错了,如下:
*** Please tell me who you are.
Run
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
很明显,是要验证身份
执行上面两条语句
git add *
git commit -m "version"
git push
ok