1

I pushed a project from Spacemacs through Magit. It asked about username, email, password. But I must have typed incorrectly. It shows that a person with the same username pushed together. But I couldn't find a way to change user information on Magit.

enter image description here

Peter
  • 301
  • 4
  • 17
  • This was because git setting was missed. Solved by setting up user information on a terminal. – Peter Oct 06 '18 at 03:32

1 Answers1

1

This was because git setting was missed.

You can avoid that with (for Git 2.8 and more)

git config --global user.useConfigOnly true

That way, if you try and commit while your user.name/user.email are *not defined, you would get an error message (instead of default metadata that won't show up properly once pushed)

no name was given and auto-detection is disabled
no email was given and auto-detection is disabled
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • That's what I really needed. thanks! But I don't think that would be safer than just set up user info. Is there any possibility that the setting could be missing again? `git config --global user.name` Maybe I'm just lack of experience. – Peter Oct 06 '18 at 19:13
  • @Pete Yes, the goal is not to be "safer": just to force the user to set those settings in case they are missing. `git config --global user.name` is indeed the preferred way. – VonC Oct 06 '18 at 19:26
  • I see, I can feel that is useful for when I become to be working with multiple account. Thanks! – Peter Oct 07 '18 at 01:47