I just installed Git + TortoiseGit, created a new local repository on my PC, added a file, and now I'm trying to commit it (I guess that's Commit -> "master").
However it says: "User name and email must be set before commit. Do you want to set these now?"
Ehh, this is supposed to be a local repository. What does any email address have to do with this?
Or am I misunderstanding the way Git works? Note that I'm not using GitHub or BitBucket or whatever. Just a local repository.
The name and email are added to the commit by Git. It's not related to login credentials. It's useful to set at least the name, even if you don't want to set your email.
If you want to leave them blank then you can enter these commands in a terminal:
git config --global user.name ""
git config --global user.email ""
which should create a ~/.gitconfig
file at your system's $HOME, which will look like:
[user]
name =
email =
Alternatively, just create or edit your current ~/.gitconfig file to look like this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With