-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
executable file
·82 lines (79 loc) · 2.69 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
[user]
# These values are set in ~/.gitconfig_local
[include]
path = ~/.gitconfig_local
[alias]
get-branch-name = "!git rev-parse --abbrev-ref HEAD"
c = "!f(){ git commit -m \"$(git get-branch-name): $1\"; };f"
# c = "!f(){ git commit -m \"$(git get-branch-name): $1\"; };f"[user]
st = status
ci = commit
br = branch
co = checkout
df = diff
glg = log --graph --abbrev-commit --decorate --date=relative --all
lg = log --color --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
lol = log --graph --decorate --pretty=oneline --abbrev-commit
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
lg = log --color --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
ls = ls-files
logbranch = for-each-ref --count=40 --sort=-committerdate refs/heads/ --format='%(committerdate:short) %(color:green)%(refname:short)'
todo = !"git grep --heading --break --ignore-case -I --color=always -e ' FIX: *' -e ' TODO: *' | sed 's/\\s\\{3,\\}/ /g' | less -R"
addmodel = add lib/model/om lib/model/map lib/form/base/ lib/filter/base/
pulls = !"git stash save 'gonna pull' && git pull && git stash pop"
omg = !"git changed | xargs code"
changed = !"git diff --name-only | uniq"
resolved = !"git changed | xargs git add"
theirs = !"git changed | xargs git checkout --theirs"
theirsadd = !"git theirs && git changed | xargs git add"
ours = !"git changed | xargs git checkout --ours"
oursadd = !"git ours && git changed | xargs git add"
pls = push --force-with-lease
lgf = log --stat
alias = "! git config --list | grep alias"
[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "status"]
added = yellow
changed = green
untracked = cyan
[core]
excludesfile = ~/.gitignore_global
whitespace = fix,-indent-with-non-tab,trailing-space,-cr-at-eol
symlinks = true
editor = nano
pager = delta
[push]
default = current
[branch]
# set rebase=true for every new branch
autosetuprebase = always
[pull]
# always rebase when pulling from a repo
rebase = true
[credential]
helper = cache --timeout=3600
[color]
ui = true
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red
new = green
whitespace = red reverse
[interactive]
diffFilter = delta --color-only
[delta]
navigate = true # use n and N to move between diff sections
light = false # set to true if you're in a terminal w/ a light background color (e.g. the default macOS terminal)
line-numbers = true
[merge]
conflictstyle = diff3
[diff]
colorMoved = default
[init]
defaultBranch = main