Black | Autistic | 22 | Enjoyer of things | Huge blue rat enjoyer | Beginner (occasional) artist| Aspiring Game Dev and VA


A certain dumb bird site:
twitter.com/Geeky_Jay9
You must log in to comment.

in reply to @geeky-jay's post:

so from a quick searchy it looks like VS Code doesn't have much of an interface for setting credentials for git.

so, here's the general command line, inside your repo:

git config user.name "John Doe"
git config user.email johndoe@example.com

(or, use git config --global if you're using the same name and email for commits everywhere)

https://docs.github.com/en/get-started/getting-started-with-git/setting-your-username-in-git
https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/setting-your-commit-email-address
especially read the 2nd link if you have github configured for email privacy.

If you don't mind your email being public. Once it's pushed up to github, it's visible to all.

What's going on under the hood here: every commit to a git repository needs a name and email. When you commit, that's logged as whodunnit for the history.

Git is software. Github is software that uses git. I am convinced the conflation and confusion this causes is by design.

Git is actually decentralized -- when you commit, you're updating a database on your computer. When you push, you're sending it somewhere else. Git on your computer doesn't actually care what name and email you use.

Github and sites like it centralize and act as a remote hub for sharing, coordination, and other features (like issue tracking) not available in git itself. They do care what's in the history for name and email, because they'll map that to a user account in their system. But "care" is a strong word -- there's no authentication to who did the commit unless you go down into the weeds for signing. Which I'm not.

Please read the linked github docs if you don't want your email public. They're going to explain it better than I can cram into this box, and there's probably a support center.