0
git config --global user.name and git config --global user.email

At First I executed above commands from my terminal.I have pushed few codes on my GitHub Now I'm switching to a different PC/laptop and I want to remove the access on my terminal completely so that if someone is using my system then they shouldn't get to know my git config details. What is the command to remove config details ?

Ashutosh D
  • 1
  • 2
  • 3
  • 4
    Git config has nothing to do with access. It's used for telling git who the author of the commits is. – evolutionxbox Jul 22 '22 at 11:21
  • Sounds like you need to be more worried about "someone" being able to sign into your computer as you... Why is this almost-inert config important rather than your ssh keys and/or other sensitive files? if you are giving your older computer to someone else or something, why aren't you wiping it? Please edit the question to clarify. – AD7six Jul 22 '22 at 11:26
  • Nobody should work with your user account at all! "global" in the sense of git means global to all of YOUR personal repos on your personal account on the machine. If you don't want to share your settings across multiple git repos, you simple can store the data local to the git folders. See also: https://stackoverflow.com/questions/2114111/where-is-the-global-git-config-data-stored. Short answer: Simply remove ~/.git* and everything is lost... if you really want to do so! – Klaus Jul 22 '22 at 11:52
  • Does this answer your question? [Where is the global git config data stored?](https://stackoverflow.com/questions/2114111/where-is-the-global-git-config-data-stored) – Klaus Jul 22 '22 at 11:52

1 Answers1

0

git global settings are stored by default at:

~/.gitconfig

So probably you are fine just deleting that file. Keep in mind that local settings are stored inside each repository folder.

See more information with:

man git config

psauleda
  • 60
  • 5
  • 1
    Certainly answers what's asked, but I suspect is the equivalent of implementing [this level of security](https://knowyourmeme.com/memes/cheeto-lock). – AD7six Jul 22 '22 at 11:37
  • yeah, usually there's no real sensitive data at this file. But certainly there are the name and email address, data that's legit to want to keep private. So it's more a privacy question that security. – psauleda Jul 22 '22 at 11:47
  • 1
    `I want to remove the access on my terminal completely` I disagree, but the question is unclear atm. I suspect this is an https://xyproblem.info/ – AD7six Jul 22 '22 at 11:51