You need to use the local set command below:
local set
git config user.email [email protected]
git config user.name 'Mahmoud Zalt'
local get
git config --get user.email
git config --get user.name
The local config file is in the project directory: .git/config
.
global set
git config --global user.email [email protected]
git config --global user.name 'Mahmoud Zalt'
global get
git config --global --get user.email
git config --global --get user.name
The global config file in in your home directory: ~/.gitconfig
.
Remember to quote blanks, etc, for example: 'FirstName LastName'