Git
Your name and email for commits
Git · 2 min read
The name and email git writes on every commit you make, set in a small form instead of a terminal.
When you would want it
Git refuses to commit until it knows who you are, and its own fix is two commands typed exactly right. A slip such as user.mail instead of user.email leaves git with no email even though you set one, and other tools hide that by supplying their own.
Where to find it
- All Features → Your name and email for commits
- Set name and email
What you get out of it
- No terminal and no exact command to type before your first commit.
- It spots the classic slip - user.mail instead of user.email - and fixes it, instead of telling you to set something you think you already set.
- It is saved in git's own settings, so VS Code, the terminal and every other tool record the same name.
How to use it, step by step
- Commit as usual - from Changes with Commit & Push, or from the Source Control panel.
- If git does not know who you are, a small form opens instead of an error. Your name and an email are already filled in, taken from your git settings and the commits you made in this project before.
- Pick the email you want on your commits, or type another.
- Keep Use for all my projects ticked to save it for every project on this computer, or untick it to use it for this project only.
- Press Save and continue. The commit goes ahead straight away.
- To change the name or email later, run Git: Set Your Name and Email from the command palette.
Why this beats the usual way
Most editors pass on git's refusal - four paragraphs ending in two commands - and leave you to work out why your setup did not count. Agentfly asks for the two values it needs, suggests the ones you have used before, and carries on with the commit you asked for.
Find it in Universal Search
Your name and email for commits · Git · git config · user.name · user.email · user.mail · author · who am i · please tell me who you are · commit identity · git needs a name and email · commit fails