dotfiles/git/gitconfig
2025-04-16 16:58:29 +00:00

92 lines
2.7 KiB
Plaintext

[user]
name = "Errol Sancaktar"
email = "errol@sancaktar.net"
[includeIf "gitdir:~/git/lucidpoint/"]
path = ~/.config/git/gitconfig.work
[includeIf "gitdir:~/git/personal/"]
path = ~/.config/git/gitconfig.personal
[color]
# Enable colors in color-supporting terminals
ui = auto
[alias]
# List available aliases
aliases = !git config --get-regexp alias | sed -re 's/alias\\.(\\S*)\\s(.*)$/\\1 = \\2/g'
# Command shortcuts
ci = commit
co = checkout
st = status
# Display tree-like log, because default log is a pain…
lg = log --graph --date=relative --pretty=tformat:'%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%an %ad)%Creset'
# List local commits that were not pushed to remote repository
review-local = "!git lg @{push}.."
# Edit last commit message
reword = commit --amend
# Undo last commit but keep changed files in stage
uncommit = reset --soft HEAD~1
[core]
# VSCode
editor = code --wait
# Don't consider trailing space change as a cause for merge conflicts
whitespace = -trailing-space
# Use better, descriptive initials (c, i, w) instead of a/b.
mnemonicPrefix = true
# Show renames/moves as such
renames = true
# When using --word-diff, assume --word-diff-regex=.
wordRegex = .
# Display submodule-related information (commit listings)
submodule = log
# Set Global gitignore file
excludesfile =~/.config/git/gitignore
[merge]
# Display common-ancestor blocks in conflict hunks
conflictStyle = diff3
# Disable fast-forward merges as default merge strategy.
# Force explicit call of `git merge --ff …`.
ff = false
[mergetool]
# Clean up backup files created by merge tools on tool exit
keepBackup = false
# Clean up temp files created by merge tools on tool exit
keepTemporaries = false
# Put the temp files in a dedicated dir anyway
writeToTemp = true
# Auto-accept file prompts when launching merge tools
prompt = false
[push]
# Default push should only push the current branch to its push target, regardless of its remote name
default = upstream
# When pushing, also push tags whose commit-ishs are now reachable upstream
followTags = true
[status]
# Display submodule rev change summaries in status
submoduleSummary = true
# Recursively traverse untracked directories to display all contents
showUntrackedFiles = all
[color "branch"]
# Blue on black is hard to read in git branch -vv: use cyan instead
upstream = cyan
[tag]
# Sort tags as version numbers whenever applicable, so 1.10.2 is AFTER 1.2.0.
sort = version:refname
[gpg]
program = /usr/bin/gpg
[commit]
gpgsign = false
[init]
defaultBranch = main
[credential "https://dev.azure.com"]
useHttpPath = true
[pull]
ff = only