FredrikNoren / ungit

The easiest way to use git. On any platform. Anywhere.
MIT License
10.44k stars 637 forks source link

Commit email and profile info is wrong. #1379

Closed thshdw closed 4 years ago

thshdw commented 4 years ago

When making commits to a private gitlab server, my profile info email specifically, is unintended. Somehow its using my personal email address and my short name instead of my work email address and fullname. My personal email is not in any way connected to the private gitlab server.

Now in the private gitlab server when you hover over my name my personal email is listed.

Here is screenshot from gitlab commits image

Here is a screenshot from gitlab activity image

Notice the gravatar's. The purple gravatar is wrong An account with this gravatar does not exist on our gitlab server. An account with my personal email does not exist on our gitlab server.

Notice the green gravatar this is the correct gravatar. Interestingly the activity is showing the correct name and email. But in the commits section and on the main project page it shows the last commit with my shortened name and my personal email.

How could this happen? Where is ungit getting the name and email info? Apparently it's not getting this data from our gitlab server.

thshdw commented 4 years ago

I had recently installed GitExtensions which created a .gitconfig and this is where the user info is pulling from.

Would it be possible to override this per project with a project specific .ungitrc file?

thshdw commented 4 years ago

The solution is to put my project specific git settings in .git/config

https://stackoverflow.com/questions/8801729/is-it-possible-to-have-different-git-configuration-for-different-projects