Skip to content

Instantly share code, notes, and snippets.

@icy
Created October 9, 2021 12:57
Show Gist options
  • Save icy/dd7935dfced89d4e8918dcf7147dc42f to your computer and use it in GitHub Desktop.
Save icy/dd7935dfced89d4e8918dcf7147dc42f to your computer and use it in GitHub Desktop.
git.config.ini
# Purpose: Sample configuration for git client
# Author : Anh K. Huynh
# License: Fair license
# Date : Somedays (MLTR)
[user]
name = Foo
email = [email protected]
#signingkey = FFFFFFFF
[color]
branch = auto
diff = auto
status = auto
[alias]
cpull = !git pull origin $(git cb)
pullc = !git pull origin $(git cb)
pu = push
pl = pull
ci = commit
di = diff --color-words
st = status -uno
stt = status
co = checkout
br = branch
lg = log -p
logf = log --follow
lol = log --graph --decorate --pretty=oneline --abbrev-commit
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
ls = ls-files
mg = merge
cb = rev-parse --abbrev-ref HEAD
cbr = rev-parse --abbrev-ref=strict HEAD
clog = log --graph --pretty=format:'%C(red)%h%Creset -%C(yellow)%d%Creset %s %C(green)(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
rclog = log --walk-reflogs --pretty=format:'%C(blue)%gD%C(reset) %C(red)%h%Creset -%C(yellow)%d%Creset %s %C(green)(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
# TheSLinux utils
stag = !git tag | grep -E "^$(git rev-parse --abbrev-ref HEAD)-[0-9.]+"
sbr = !git branch | grep " $(git rev-parse --abbrev-ref HEAD)"
[color "branch"]
current = white
local = magenta
remote = cyan
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = yellow
changed = green
untracked = cyan
[url "ssh://[email protected]/"]
insteadOf = https://github.com/
[pull]
ff = only
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment