I have one machine for now that I have to use for both work and personal. Not ideal but works for now. I have created 2 separate ssh keys and have only added my personal key to my personal github. When I start a project I used this to set my creds for the folder:
killall ssh-agent && ssh-add ~/.ssh/id_rsa_jaysnel && git config user.name "myUsername" && git config user.email "myEmail"
Yet somehow my work profiles shows as the one who did the commit. Is there a way to just blacklist my work profile from any commits at all to my account?
CodePudding user response:
SSH keys or HTTPS URL should not have any bearing on commit authorship.
If you have set the user.name/email, make a commit locally, and check you see the right author and committer name and email (the email is importnant) with:
git log --pretty=format:"author: %an