简介
这些天新建Android Studio工程的时候需要commit和push到github上,却报错无法commit,错误信息如下
16:44 Commit failed with error
0 files committed, 40 files failed to commit: 实现连接ranye服务器并publish topic
--author 'Kearney' is not 'Name <email>' and matches no existing author
我人都傻了,之前commit了几十次的这个名称没啥毛病哇。。。。
然后我也试了单独输入邮箱或者用户+邮箱。。结果也是失败了。。。。。
解决办法
查看git用户信息
查看用户名
git config user.name
查看邮箱
git config user.email
比如我的信息为Kearney,邮箱为kearney@gmail.com
那么在AS中commit填写Author的时候格式为:
UserName<Mail>
commit && push
注意是尖括号。。。我之前填成圆括号,怪不得fail
成功之后我想po个图
16:47 Pushed master to new branch origin/master
References
- https://blog.csdn.net/xyc_csdn/article/details/72865266
- https://blog.csdn.net/LVXIANGAN/article/details/108276443