Primary Configuration
The main ~/.gitconfig file serves as the entry point for Git's configuration:
[includeIf "gitdir:~/src/*"]
path = ~/.gitconfig-work
[includeIf "gitdir:~/src/sandbox/*"]
path = ~/.gitconfig-personal
[includeIf "gitdir:~/Documents/*"]
path = ~/.gitconfig-personal
[includeIf "gitdir:~/src/"]
path = ~/Documents/git-work-precommit
[commit]
gpgsign = true
[alias]
lg1 = log \
--graph \
--abbrev-commit \
--decorate \
--format=format:'%C(bold blue)%h%C(reset) - \
%C(bold green)(%ar)%C(reset) \
%C(white)%s%C(reset) %C(dim white)- \
%an%C(reset)%C(bold yellow)%d%C(reset)' \
--all
lg2 = log \
--graph \
--abbrev-commit \
--decorate \
--format=format:'%C(bold blue)%h%C(reset) - \
%C(bold cyan)%aD%C(reset) \
%C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n''\
%C(white)%s%C(reset) %C(dim white)- %an%C(reset)' \
--all
lg = !"git lg1"
diffc = diff --color-words=.
meld = difftool --tool=meld -y
meldd = difftool --dir-diff --tool=meld
meldbase = !git meld $(git merge-base origin/master HEAD)
review = !git fetch $1 $2 && git checkout FETCH_HEAD && git meldbase && true
[core]
editor = vim