Configuration of Git
We can configure Git both locally and globally. If we want to set ownership for a single repository, we configure it locally. If we want the ownership settings to apply to all repositories on the system, we configure it globally.
Check if Git is installed
Open your terminal (linux/macOS) or GitBash (Windows):
git --versionif installed, you will see something like :

Configure Git Globally
This sets your identity for all repositories on your system.
Warning: If you'll push to GitHub and want to keep your email private, use Github's noreply email (e.g., [email protected])


Configure Git Locally
Step 1 : Create a Repository
Make a directory gitproject and navigate to folder and initialize the git repo with command git init.



if you want to push local repo to GitHub, you can learn from here
Step 2 : Configure the Git locally
We can use
--localinstead of--globalin the configuration to configure the git repo locally.

View Git Configuration
If you want to view Global Configuration, use command :
it will show you configuration details :

If you want to view Local Configuration, navigate the repo folders and run the command :

Last updated