Apply some recommendations from git dx book

This commit is contained in:
Maximilian Friedersdorff 2024-12-02 12:13:41 +00:00
parent 82e3fa9114
commit 911dd07d1e
9 changed files with 114 additions and 37 deletions

View file

@ -0,0 +1,62 @@
[color]
ui = true
branch = always
status = always
interactive = always
diff = true
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
frag = magenta bold
meta = yellow bold
new = green bold
old = red bold
whitespace = red reverse
[color "status"]
added = yellow
changed = green
untracked = cyan
[status]
short = true
branch = true
[user]
name = Maximilian Friedersdorff
email = "max@gwairfelin.com"
[includeIf "gitdir:~/src/esl/"]
path = ~/.config/git/config-esl
[diff]
tool = vimdiff
[merge]
tool = vimdiff
ff = true
[push]
default = simple
[alias]
lg = log --graph --pretty=format:'%Cred%h%Creset %G? %ad %s %C(bold blue)<%an>%Creset %C(yellow)%d%Creset' --date=short
hist = log --graph --full-history --all --pretty=format:'%Cred%h%Creset %G? %ad %s %C(bold blue)<%an>%Creset %C(yellow)%d%Creset' --date=short
struct = log --graph --full-history --all --pretty=format:'%ad %s %Creset %C(yellow)%d%Creset' --date=short --simplify-by-decoration
co = checkout
c = commit
s = status
d = diff
commit = commit -S
vt = tag -v
tag = tag -s
t = tag -s
alias = "!req=$'\\033[0;31m=\\033[0m'; git config --get-regexp ^alias\\. | sed -e s/^alias\\.// -e \"s/\\ /\t$req\\ /\""
pa = !git remote | xargs -L1 git push --all
fi = flow finish --push --no-ff
changes = "!git log $(git tag -l --sort=taggerdate | tail -n 1)..HEAD --pretty=format:'* %s' --no-merges --reverse"
[pull]
rebase = false
[sendemail]
smtpserver = mail.friedersdorff.com
smtpuser = max
smtpencryption = tls
smtpserverport = 587
[mergetool "vimdiff"]
cmd = nvim -d $LOCAL $BASE $REMOTE $MERGED -c "$wincmd w" -c "wincmd J"
[help]
autoCorrect = immediate

View file

@ -0,0 +1,2 @@
[user]
email = "maximilian.friedersdorff@envsys.co.uk"

View file

@ -0,0 +1,52 @@
## VIM specific patterns
# Swap
[._]*.s[a-v][a-z]
!*.svg # comment out if you don't need vector files
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]
# Session
Session.vim
Sessionx.vim
# Temporary
.netrwhist
*~
# Auto-generated tag files
tags
# Persistent undo
[._]*.un~
## Linux specific patterns
*~
# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*
# KDE directory preferences
.directory
# Linux trash folder which might appear on any partition or disk
.Trash-*
# .nfs files are created when an open file is removed but is still being accessed
.nfs*
## Python specific settings
# Rope project settings
.ropeproject
# Distribution / packaging
.Python
build/
dist/
*.egg
*.egg-info/
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]

View file

@ -0,0 +1,2 @@
[status]
disabled = false