1

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?

1 Answer 1

1

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 %ae / committer: %cn %ce" -1

Once you do, you can push those commits and the right profile will be associated to them on GitHub.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.