Skip to content

Instantly share code, notes, and snippets.

@gafda
Last active January 15, 2026 19:12
Show Gist options
  • Select an option

  • Save gafda/23ada29bd7a404c1e511fea6e0b8fb23 to your computer and use it in GitHub Desktop.

Select an option

Save gafda/23ada29bd7a404c1e511fea6e0b8fb23 to your computer and use it in GitHub Desktop.
GIT Config file in windows format
[user]
name = <first> <last name>
email = <my-email>@<corp>
signingKey = ssh-ed25519 mYaWsOmEsUpErKey <my-email>@<corp>
[alias]
aliases = config --get-regexp '^alias\\.'
bt = branch --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(contents:subject) %(color:green)(%(committerdate:relative)) [%(authorname)]' --sort=-committerdate
compact = !git gc --aggressive --prune=now
conflicts=diff --name-only --diff-filter=U
done = !git push origin HEAD
lg = "!f() { \
git log --all --color --graph --pretty=format:'%C(bold yellow)<sig>%G?</sig>%C(reset) %C(red)%h%C(reset) -%C(yellow)%d%C(reset) %s %C(green)(%cr) %C(blue)<%an>%C(reset)' | \
sed \
-e 's#<sig>G</sig>#Good#' \
-e 's#<sig>B</sig>#\\nBAD \\nBAD \\nBAD \\nBAD \\nBAD#' \
-e 's#<sig>U</sig>#Unknown#' \
-e 's#<sig>X</sig>#Expired#' \
-e 's#<sig>Y</sig>#Expired Key#' \
-e 's#<sig>R</sig>#Revoked#' \
-e 's#<sig>E</sig>#Missing Key#' \
-e 's#<sig>N</sig>#None#' | \
less -r; \
}; f"
lg2 = !git log --pretty=format:\"%C(magenta)%h%Creset -%C(red)%d%Creset %s %C(dim green)(%cr) [%an]\" --abbrev-commit -30
ls = log --pretty=format:'%C(yellow)%h%Creset %s %Cgreen(%cr)%Creset %Cred%d%Creset' --abbrev-commit --date=relative
ppr = !git pull -p --rebase
res = !git reset --hard
st = status
tl = log --tags --simplify-by-decoration --pretty='format:%ai %d'
tree = log --graph --full-history --all --color --date=short --pretty=format:'%Cred%x09%h %Creset%ad%C(bold yellow)%d %C(dim cyan) %s %C(reset)(%an)%Creset'
tree2 = log --graph --abbrev-commit --decorate --date=relative --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
undo = reset HEAD~1 --mixed
safeclean = !git clean -fdx -e **/*.env
sc = safeclean
compress = !git gc --prune=now
[winUpdater]
recentlySeenVersion = 2.52.0.windows.1
[credential]
helper = wincred
[core]
editor = vim
autocrlf = false
[push]
default = simple
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[tag]
gpgsign = true
[gpg "ssh"]
allowedSignersFile = C:/Users/<user>/.ssh/allowed_signers
[commit]
gpgSign = true
[gpg]
format = ssh
[credential "https://github.com"]
username = <github-username>
[column]
ui = auto
[branch]
sort = -committerdate
[color]
ui = auto
[pull]
rebase = true
[safe]
directory = *
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment