get git config username code example

Example 1: git user.name user.email

git config --global user.name "Your Name"
git config --global user.email "[email protected]"

Example 2: git list user and email

git config --global --get user.name
git config --global --get user.email

Example 3: git config username

$ git config --global user.name "John Doe"
$ git config --global user.email [email protected]

Example 4: git show username

git config --list

Example 5: How to check git config username?

git config user.name

Example 6: git config global username

git config --global user.name "John Doe"
git config --global user.email [email protected]