Search code examples
git

Getting 'fatal: empty ident name not allowed' when doing 'Git commit --amend'


I am doing a git commit --amend and I get this error:

fatal: empty ident name (for <>) not allowed

I've found a bunch of stuff saying I need to set my user.email and user.name, but I have. This is the the result when I do a git config --global --list:

core.exludesfile=/home/dzou/.gitignore
core.editor=vim
[email protected]
user.name=dzou

What is going on here?


Solution

  • Set global user.name and user.email first by order like below.

    $ git config --global user.name "dzou"
    $ git config --global user.email "[email protected]"
    

    NB: careful, use double quote instead of single quotes