Skip to content

Instantly share code, notes, and snippets.

@Alex132006
Forked from tdd/gitconfig.ini
Created October 5, 2025 17:35
Show Gist options
  • Select an option

  • Save Alex132006/597cb45e870f618975c9cd27c59c5990 to your computer and use it in GitHub Desktop.

Select an option

Save Alex132006/597cb45e870f618975c9cd27c59c5990 to your computer and use it in GitHub Desktop.
Nice, useful global Git configuration
# Put this in your ~/.gitconfig or ~/.config/git/config
# Windows users: "~" is your profile's home directory, e.g. C:\Users\<YourName>
[user]
name = Your Full Name
email = your@email.tld
[color]
ui = auto
[alias]
st = status
ci = commit
lg = log --graph --pretty=tformat:'%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%an %ar)%Creset'
oops = commit --amend --no-edit
[core]
pager = cat
#
# Out of luck: on Windows w/o msysGit? You may have Notepad++…
# editor = 'C:/Program Files/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin
#
# If you want to use Sublime Text 2's subl wrapper:
# editor = subl -w
#
# Or Atom, perhaps:
# editor = atom --wait
#
# Sublime Text 2 on Windows:
# editor = "'c:/program files/sublime text 2/sublime_text.exe' -w"
#
# Sublime Text 3 on Windows:
# editor = "'c:/program files/sublime text 3/subl.exe' -w"
#
whitespace = -trailing-space
[diff]
mnemonicPrefix = true
renames = true
wordRegex = .
submodule = log
[fetch]
recurseSubmodules = on-demand
[grep]
extendedRegexp = true
[log]
abbrevCommit = true
[merge]
conflictStyle = diff3
[mergetool]
keepBackup = false
keepTemporaries = false
prompt = false
[pull]
# This is GREAT… when you know what you're doing and are careful
# not to pull --no-rebase over a local line containing a true merge.
# rebase = true
# WARNING! This option, which does away with the one gotcha of
# auto-rebasing on pulls, is only available from 1.8.5 onwards.
rebase = preserve
[push]
default = upstream
[rerere]
# If, like me, you like rerere, uncomment these
# autoupdate = true
# enabled = true
[status]
submoduleSummary = true
showUntrackedFiles = all
[color "branch"]
upstream = cyan
[tag]
sort = version:refname
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment