mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-01-26 11:14:08 +00:00
Feat(config): Deduplicate git config, add special
This commit is contained in:
62
config/git/shared
Normal file
62
config/git/shared
Normal file
@@ -0,0 +1,62 @@
|
||||
[credential]
|
||||
helper = store --file ~/.cache/git/git-credentials
|
||||
helper = cache --timeout 30000
|
||||
|
||||
[core]
|
||||
excludesfile = ~/.config/git/gitignore
|
||||
|
||||
[init]
|
||||
defaultBranch = main
|
||||
|
||||
[pull]
|
||||
rebase = true
|
||||
|
||||
[gpg]
|
||||
format = ssh
|
||||
|
||||
[alias]
|
||||
branchbydate = for-each-ref --count=30 --sort=-committerdate refs/heads/ --format='%(refname:short)'
|
||||
branchcolor = "!for ref in $(git for-each-ref --sort=-committerdate --format=\"%(refname)\" refs/heads/ refs/remotes ); do git log -n1 $ref --pretty=format:\"%Cgreen%cr%Creset %C(yellow)%d%Creset %C(bold blue)<%an>%Creset%n\" | cat ; done | awk '! a[$0]++'"
|
||||
llog = log --pretty=fuller
|
||||
logs = log --graph --pretty=format:'%C(magenta)%h%Creset -%C(red)%d%Creset %s %C(dim green)(%cr) %C(cyan)<%an>%Creset' --abbrev-commit
|
||||
nah = !git reset --hard && git clean -df
|
||||
reset-origin = !git fetch origin && git reset --hard origin/master && git clean -f -d
|
||||
reset-upstream = !git fetch upstream && git reset --hard upstream/master && git clean -f -d
|
||||
rl = reflog --format='%C(auto)%h %<|(20)%gd %C(blue)%cr%C(reset) %gs (%s)'
|
||||
tagdate = log --date-order --graph --tags --simplify-by-decoration --pretty=format:\"%ai %h %d\"
|
||||
undo-commit = reset HEAD~ --soft
|
||||
|
||||
[filter "lfs"]
|
||||
clean = git-lfs clean -- %f
|
||||
smudge = git-lfs smudge -- %f
|
||||
process = git-lfs filter-process
|
||||
required = true
|
||||
|
||||
[diff]
|
||||
tool = difftastic
|
||||
|
||||
[difftool]
|
||||
prompt = false
|
||||
|
||||
[difftool "difftastic"]
|
||||
cmd = difft "$LOCAL" "$REMOTE"
|
||||
|
||||
[color]
|
||||
ui = true
|
||||
diff = auto
|
||||
branch = auto
|
||||
status = auto
|
||||
|
||||
[color "status"]
|
||||
added = green bold
|
||||
changed = yellow
|
||||
deleted = red bold strike
|
||||
untracked = cyan
|
||||
branch = yellow black bold ul
|
||||
|
||||
[submodule]
|
||||
recurse = true
|
||||
|
||||
# dotfiles special config
|
||||
[includeIf "hasconfig:remote.*.url:https://github.com/ivuorinen/dotfiles.git"]
|
||||
path = ~/.dotfiles/config/git/special/dotfiles ;
|
||||
Reference in New Issue
Block a user