Skip to content

Instantly share code, notes, and snippets.

@aesopwolf
aesopwolf / add-git-email-to-command-prompt.md
Last active July 20, 2022 22:33
Add git email to command prompt

Add git email to command prompt

TLDR: Do you use different names/emails for git version control (work vs personal)? Then add your user info to the command prompt as a visual reminder of who you're committing as.

The problem

A few months ago I ran into a dirty situation, I committed and pushed a lot of code using the wrong git config user.name and git config user.email(I was using personal info instead of work info).

Fixing it was possible, but I had to rewrite git history (ouch!)

### Keybase proof
I hereby claim:
* I am aesopwolf on github.
* I am aesopwolf (https://keybase.io/aesopwolf) on keybase.
* I have a public key whose fingerprint is 2A62 B907 FC91 285B 362D C28E 6365 58B9 0C65 A558
To claim this, I am signing this object: