ENDARI
August 20, 2024

Setting git up!

Posted on August 20, 2024  •  2 minutes  • 230 words
Table of contents

To Config git

take the steps bellow and your basic git setup is done in minutes

There are 3 levels of configurations

Commands to edit each Settings level:

git config --sytem <setting to edit> <setting value> 

git config --global <setting to edit> <setting value> 

git config --local <setting to edit> <setting value> 

Scope

SYSTEM : All Users of current computer

GLOBAL: All repositories of current user

LOCAL: The current Repository

The Settings

Line Endings

git config --global core.autocrlf true
git config --global core.autocrlf input

The User Name

git congif --global user.name "<user's name>" 

The Email address

git config --global user.email name@domain.com 

The Default Editor (Editor must be added to path)

git config --global core.editor "code --wait" 

To open settings in the editor

git config --global -e 

My Prettified git log

    git config --global alias.glog "log --pretty=format:'%C(yellow)%h %C(blue)%ad %C(cyan)| %Creset%s%C(red)%d%Creset [%C(green)%an%Creset]' --graph --date=short"

To list all settings and their origin

git config --list --show-origin

To Disable pager for a specific command

git config --global pager.log false
# or pager.diff  for diff, and ...
Follow me!

I am on social media, but I'm not really into socializing over media!