Question: 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.

Answer: 
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.
In Git both a username and a mail address are associated to each commit, even for local repositories (In fact, in Git, all repositories are arguably local). 

It is, however, simply used as a label. It won't send you any mail. If you are concerned with your privacy, or you simply don't want to write your real e-mail for whatever reason, you can enter a fake one and it will cause no issues.

In fact, this is precissely the approach recommended by GitHub for users with privacy concerns (<https://help.github.com/articles/keeping-your-email-address-private>).