-3

I have two gitHub accounts, and I would like to keep them 100% separate. I do not want to add myself as a collaborator on either account. Every time I push to an account, I re-configure my git user settings.

Is there a git command in the terminal that will allow me to see which user I am currently logged-in as on my local computer? so that I can know if I need to reconfigure my git settings or not?

something like:

git user.name

and

git user.email

that would log:

user: yourUserName
email: you@email.com

Thanks!

Maiya
  • 932
  • 2
  • 10
  • 26
  • 1
    `git config --list`; `git config user.name`; `git config user.email` – Xavier Guihot Mar 04 '18 at 17:37
  • @XavierGuihot Thank you. That solved the problem. I need to figure out how to search the site because I searched and was not able to find that answer. If you have any tips, I'm happy to know them. Thanks. – Maiya Mar 04 '18 at 17:44

1 Answers1

-1

The answer was git config --list per @Xavier Guihot

Maiya
  • 932
  • 2
  • 10
  • 26