Skip to content

Instantly share code, notes, and snippets.

View gist:88045bc7c900b1025d4a
### 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:
@aesopwolf
aesopwolf / add-git-email-to-command-prompt.md
Last active Jul 20, 2022
Add git email to command prompt
View add-git-email-to-command-prompt.md

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!)