5

I am using Gitkraken for my Github source code control. I have followed this approach but still failed.

But when I type below command and I can get my name shows.

$ git config --global user.name My Name

But, it still shows Unknown in my GitKraken. I know the one with SourceTree can use the git config --global user.name "Name" trick.

Please help, thanks!

Tianbing Leng
  • 560
  • 1
  • 8
  • 22
  • Not directly related, but GitKraken v5 finally respects the repo's local gitconfig. So commits you make from GitKraken will use the username and email from the local gitconfig if set. I think this is the biggest "feature" of v5... – sceid Mar 13 '19 at 11:57
  • Also, if anyone wants his/her Git profile photo shown in the GitKraken, you need to link to your https://en.gravatar.com/ – Tianbing Leng Apr 08 '19 at 17:50

1 Answers1

6

I suspect the problem is that the global user was not set when GitKraken first created the profile. As described in the GK documentation:

When setting Profiles in Preferences > Profiles, GitKraken will automatically use the name and email address in your global .gitconfig file.

If that wasn't set, however, you might be shown as Unknown. You can change this by editing your profile either in the aforementioned Preferences > Profiles screen or by clicking on your profile picture in the top right (next to the magnifying glass), select Edit next to your profile, and provide your name and email in the respective fields.

Note that if Keep my Git config updated with my profile info is checked in your GK Preferences > Profiles, changing this in your default GK profile will automatically update your global git config.

kowsky
  • 12,647
  • 2
  • 28
  • 41
  • All makes sense, but I updated the profile, and it lists my username there, but the specific commit is still listed as authored by "Unknown." Will this remain permanent? This is only happening on the latest commit on the master branch... up till then I'd been branching, committing and merging as my full name (but I'd previously been managing the repo via Sourcetree, so maybe that's why...?) – Halfacre May 17 '18 at 17:06
  • Setting user and email will not alter existing commits, i.e. the commit will forever be authored by "Unknown". Changing existing commits' authors is described [in this question](https://stackoverflow.com/questions/750172/change-the-author-and-committer-name-and-e-mail-of-multiple-commits-in-git). Seems like sourcetree did use your right credentials in your case. – kowsky May 18 '18 at 05:53