pycharm提交commit时git报错:please tell me who you are
<h3><span style="font-size: 16px">一、错误</span></h3><p><span style="font-size: 16px">pycharm同步代码,提交commit时git报错: commit failed with error please tell me who you are</span></p>
<p><span style="font-size: 16px"><img src="https://img2024.cnblogs.com/blog/1740393/202507/1740393-20250704160035310-867931841.png"></span></p>
<h3><span style="font-size: 16px"> 二、原因</span></h3>
<p><span style="font-size: 16px">第一次提交,或者长时间未提交代码,需要对git设置账户信息</span></p>
<h3><span style="font-size: 16px">三、步骤</span></h3>
<p><span style="font-size: 16px">1.pacharm 中打开terminal运行环境</span></p>
<p><span style="font-size: 16px">执行</span></p>
<div class="hljs-ln-line hljs-ln-code"><span style="font-size: 16px">git config --global user.name <span class="hljs-string">"你的用户名"</span></span></div>
<div class="hljs-ln-line hljs-ln-code"><span style="font-size: 16px">git config --global user.email <span class="hljs-string">"你的邮箱地址"</span></span></div>
<div class="hljs-ln-line hljs-ln-code"><span style="font-size: 16px">设置用户名和邮箱地址</span></div>
<div class="hljs-ln-line hljs-ln-code">
<p><span style="font-size: 16px"><img src="https://img2024.cnblogs.com/blog/1740393/202507/1740393-20250704160755045-357519036.png"></span></p>
<p><span style="font-size: 16px"><img src="https://img2024.cnblogs.com/blog/1740393/202507/1740393-20250704160815957-207076340.png"></span></p>
<p><span style="font-size: 16px"> 2.检查git</span></p>
<p><span style="font-size: 16px">执行</span></p>
<p><span style="font-size: 16px">git config --global --list</span></p>
<p><span style="font-size: 16px">检查用户名和邮箱地址是否成功正确</span></p>
<p><span style="font-size: 16px"><img src="https://img2024.cnblogs.com/blog/1740393/202507/1740393-20250704161012358-2114173015.png"></span></p>
<h3><span style="font-size: 16px"> 四、提交</span></h3>
<p><span style="font-size: 16px">账户信息添加完成,重新commit,成功</span></p>
</div><br><br>
来源:https://www.cnblogs.com/xiaoguan-bky/p/18965870
頁:
[1]