Skip to content

Instantly share code, notes, and snippets.

@whoisj
Last active September 26, 2025 16:44
Show Gist options
  • Select an option

  • Save whoisj/4c9c29db68e58ba2004f to your computer and use it in GitHub Desktop.

Select an option

Save whoisj/4c9c29db68e58ba2004f to your computer and use it in GitHub Desktop.
[branch]
autosetupmerge = always
autosetuprebase = always
[user]
name = J Wyman
email =
[fetch]
prune = true
[push]
default = simple
[credential]
helper = manager
[core]
editor = \"C:/Program Files/Notepad++/notepad++.exe\" -multiInst -nosession -noPlugin $@
preloadindex = true
fscache = true
askpass = askpass
[alias]
amend = "!f() { git commit --amend --no-edit --no-verify --status $@; }; f"
edit = "!f() { \"C:/Program Files/Notepad++/notepad++.exe\" -multiInst -nosession -noPlugin $@; }; f"
detach = "!f() { git checkout --detach ${1:-HEAD}; }; f"
force = "!f() { git push --force-with-lease; }; f"
get = "!f() { git fetch -np $@; }; f"
logi = "!f() { git log --oneline --decorate --first-parent -30 $@; }; f"
logx = "!f() { git log --oneline --decorate --graph -30 $@; }; f"
nuke = "!f() { git clean -xdf; git reset --hard HEAD; }; f"
pick = "!f() { git cherry-pick $@; }; f"
resafe = "!f() { git config --global --unset http.proxy; git config --global --unset http.sslVerify; printf 'unsafe injection *disabled* for Fiddler tracing.\n'; }; f"
root = "!f() { git rev-parse --show-toplevel; }; f"
sweep = "!f() { git branch --merged src/master | xargs -n 1 git branch -D 2>/dev/null; git branch --list -r src/releases* | xargs -n 1 git branch --merged | xargs -n 1 git branch -D 2>/dev/null; }; f"
sync = "!f() { git fetch --all; git sweep; git push dst src/master:master; }; f"
unsafe = "!f() { git config --global http.proxy 127.0.0.1:8888; git config --global http.sslVerify false; printf 'unsafe injection *enabled* for Fiddler tracing.\n'; }; f"
[gc]
auto = 4096
[gc "refs/remotes/*"]
reflogExpire = 7 days
reflogExpireUnreachable = 2 days
[status]
relativePaths = false
[filter "lfs"]
clean = git-lfs clean %f
smudge = git-lfs smudge %f
required = true
[difftool "bc4"]
cmd = \"C:/Program Files/Beyond Compare 4/bcomp.exe\" \"$LOCAL\" \"$REMOTE\"
[diff]
tool = bc4
[mergetool "bc4"]
cmd = \"C:/Program Files/Beyond Compare 4/bcomp.exe\" \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\"
prompt = false
trustExitCode = true
[merge]
tool = bc4
@andrewwhitecdw
Copy link

Can I share with you an opinionated gitconfig tested in wsl?

@whoisj
Copy link
Author

whoisj commented Sep 26, 2025

Can I share with you an opinionated gitconfig tested in wsl?

Sure. Why not?

@andrewwhitecdw
Copy link

andrewwhitecdw commented Sep 26, 2025

Thanks for replying, have a great weekend!

[core]
  editor = nvim
  pager = less -FXRS
  excludesfile = ~/.gitignore
  fsmonitor = true
  untrackedCache = true
  commitGraph = true
[init]
  defaultBranch = main
[user]
        name = John Doe
        email = john@example.com
        useConfigOnly = true
[pull]
  rebase = true
  ff = only
[fetch]
  prune = true
  pruneTags = true
  writeCommitGraph = true
  all = true
[push]
  default = simple
  autoSetupRemote = true
  followTags = true
[diff]
  algorithm = histogram
  colorMoved = plain
  mnemonicPrefix = true
  renames = true
[merge]
  conflictstyle = zdiff3
[rebase]
  autoSquash = true
  autoStash = true
  updateRefs = true
[alias]
  st = status -sb
  co = checkout
  ci = commit
  br = branch -vva
  lg = log --oneline --graph --decorate --all
  up = !git fetch --prune --tags && git pull --rebase --autostash
  amend = commit --amend --no-edit
  wip = !git add . && git commit -m 'WIP'
  fixup = commit --fixup
  reword = commit --amend
  who = shortlog -sn --no-merges
  clean-branches = !git branch --merged | egrep -v '(^\\*|main|master|develop)' | xargs git branch -d
[color]
  ui = auto
[status]
  short = true
[commit]
  verbose = true
        gpgsign = false
[help]
  autocorrect = prompt
[grep]
  lineNumber = true
  column = true
  break = true
[tag]
  sort = version:refname
[rere]
  enabled = true
  autoupdate = true
[feature]
  manyFiles = true

[credential "https://github.com"]
        helper =
[credential]
        helper = store

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment