[PhpStorm] Git account settings

Hello!

Im using git integration and want to have my commits signed with my username&email. But if I leave "author" field empty:

blank_username.PNG
git log shows unknown author:
git_unknown.PNG
If I put correct git username to the "Author" field, commit will be signed. But I cant find how to set up my git account (username & email).

Windows XP, PhpStorm PS-100.36.

PS. Sorry for my "english" ;)

4 comments
Comment actions Permalink

Set your default username and email using the following command. This information will be used when committing to the repository.

"Your Name"

You could later redefine email for the specific repository using the following command:

git config user.email your.name@domain
0
Comment actions Permalink

I have already set these global variables. And when I use empty author name in PhpStorm, I want git to use my global settings like it git bash does.

But when I type my git username ("biakaveron") as author, git log shows both username and email for this commit. And I must type it every time I want commit something. Is it expected behavior?

0
Comment actions Permalink

Ivan,

1. please check that your settings are correcly applied. Execute these commands from your project folder:

git config --get user.name

git config --get user.email
They should return correct values.

2. let me clarify what is actually happening. Is the information below correct?
2.1. If you leave the Author field blank, the author of your commit is "unknown <Administrator@.(none)>"?
2.2. If you fill the Author field with your nickname "biakaveron" the author your commit becomes "biakaveron" or the value you've configured in git global settings?

0
Comment actions Permalink

Hello, Kirill!

1. Its strange, but git config --get returns nothing. But my global .gitconfig file has [user] section with name&email settings...
2.1. Yes.
2.2. Commit author becames biakaveron <biakaveron@gmail.com> (my global settings).

When I redefine values with git config --global command, git config --get returns correct values, and PhpStorm's git plugin works! So, this was a kind of git bug, as I see. Sorry for wasting your time. Thanks!

0

Please sign in to leave a comment.