-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgitconfig
33 lines (33 loc) · 1.11 KB
/
gitconfig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
[push]
default = current
[color]
ui = auto
[alias]
branches = for-each-ref --sort=-committerdate --format=\"%(color:blue)%(authordate:relative)\t%(color:red)%(authorname)\t%(color:white)%(color:bold)%(refname:short)\" refs/remotes
dsf = "!f() { [ -z \"$GIT_PREFIX\" ] || cd \"$GIT_PREFIX\" && git diff --color \"$@\" | diff-so-fancy | less --tabs=4 -RFX; }; f"
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
co-pr = !sh -c 'git fetch origin pull/$1/head:pr/$1 && git checkout pr/$1' -
publish = "!git push origin $(git current-branch)"
unpublish = "!git push origin :$(git current-branch)"
[core]
excludesfile = ~/.gitignore
pager = less -FRSX
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
editor = nvim -f
autocrlf = input
safecrlf = true
# commentchar = *
[commit]
template = ~/.gitmessage
[merge]
ff = only
[fetch]
prune = true
[rebase]
autosquash = true
[diff]
colorMoved = zebra
[include]
path = ~/Documents/Sync/gitconfig.sync
[init]
defaultBranch = main