【git】Git commit时提示错误时 解决办法

* Please tell me who you are. 
Run 
git config –global user.email “you@example.com” 
git config –global user.name “Your Name”
to set your account’s default identity. 
Omit –global to set the identity only in this repository. 
fatal: unable to auto-detect email address
解决办法: 
打开终端,进入自己的项目下,有个.git目录 
cd ~/MyPro/.git 
vi config
[core]
      repositoryformatversion = 0
           filemode = true
           bare = false
           logallrefupdates = true
           ignorecase = true
 #添加以下三行:
[user]
     email = yourname@me.com
     name = yourname

to set your account's default identity.Omit --global to set the identity only in this repository.

posted @   opensmarty  阅读(367)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· Docker 太简单,K8s 太复杂?w7panel 让容器管理更轻松!
历史上的今天:
2022-04-02 【nginx】Nginx 之在windows下的安装与启动
2019-04-02 【ubuntu】修改php-fpm和nginx运行用户
点击右上角即可分享
微信分享提示