[Dev Notes] setup git credentials globally and quick

This happens from time to time when you are setting up a new machine or getting a new machine or a machine has just gone broke. Now you have to login with your credentials every time…no thank you!

So seeing that I have had to dig around a few times I decided to take my own notes to know where to go

How to check your current git credentials or if you have one

git config --list

Now you’ll either see a load of details or not too much happening in the console(if not much action be sure to install git to your machine first). However look for the user.name and user.email values. they should contain your git username and git email address.

How to set git credentials globally

$ git config --global user.name John_Doe
$ git config --global user.email johndoe@example.com

After adding your details you can check it out by following the first step to check if all has been set correctly.

There are more details for adding git credentials locally there may be an instance where you require another account to access another repo.

for more details here is my source