The Git configuration file is used to store the configuration of a git repository.
If you have never used Git before, you likely need to set it up.
In this tutorial, we will learn things that you can configure when starting with Git.
The only real requirement is to configure the git
user.email to allow commits and pushes.
Optionally, I will show you other configurations that you could use upon startup.
Before you can use Git, you need to install it. Here are some guides to help you install Git.
After the Git installation, we need to configure a few things.
Configure Email and User Name (important)
If you are on Windows, open Git Bash, on MacOS, open the Terminal.
From the Terminal
$ git config --global user.name "Your Name" $ git config --global user.email "firstname.lastname@example.org"
Configure Default Editor (optional)
If you want, and this is truly optional, you may define what is your default code editor.
In my case, I use VSCode with Github.
To define Visual Studio Code as the default editor:
$ git config --global core.editor "code --wait"
Configure Git Colors (optional)
The colours can be configured to make git more readable.
$ git config --global color.diff auto $ git config --global color.status auto $ git config --global color.branch auto
This was an introduction to the basic Git configurations that can be made upon starting using Version Control.
Other Version Control with Git and Github Posts
SEO Strategist at Tripadvisor, ex- Seek (Melbourne, Australia). Specialized in technical SEO. Writer in Python, Information Retrieval, SEO and machine learning. Guest author at SearchEngineJournal, SearchEngineLand and OnCrawl.