Git - .gitconfig
This is the base file which always makes it easier and prettier to work with Git in command line.
[user]
name = Michal Slepko
email = michal.slepko@gmail.com
[push]
default = simple
Most used commands
For example: insted git checkout
I can just type git co
[alias]
ct = commit -m
dc = diff --cached
st = status -s
co = checkout
br = branch
ls = log --pretty=format:'%C(yellow)%h %C(blue)%ad%C(red)%d %C(reset)%s%C(green) [%cn]' --decorate --date=short
lsv = log --pretty=format:'%C(yellow)%h %C(blue)%ad%C(red)%d %C(reset)%s%C(green) [%cn]' --decorate --date=short --numstat
So much color
[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
whitespace = red reverse
[color "status"]
added = yellow
changed = green
untracked = cyan
We all make typos
[help]
autocorrect = 1
It will automatically correct and execute mistyped commands, e.q.
WARNING: You called a Git command named 'pulll', which does not exist.
Continuing under the assumption that you meant 'pull'
Use separate file for usernames / github token / etc
[include]
path = ~/.gitconfig.local