Git-问题

1、提交时报错

  • (1)问题
]# git commit -m "Initial contents of public_html" --author="heng ha <hengha@123.com>"
Committer identity unknown

*** 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 (got 'root@centos71.(none)')
  • (2)解决问题
//修改项目目录中的配置文件.git/config,添加如下信息。你自己的邮箱,你自己的姓名
]# vim .git/config
[user]
email=hengha@123.com
name=heng ha

1

#                                                                                                                            #
posted @ 2023-03-13 13:32  麦恒  阅读(51)  评论(0编辑  收藏  举报