-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
67 lines (59 loc) 路 2.24 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
[core]
editor = vim
excludesfile = ~/.gitignore_global
attributesFile = ~/.gitattributes
ignorecase = false
pager = less -R
[init]
defaultBranch = main
[pull]
rebase = false
[push]
default = current
[color]
ui = auto
interactive = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[alias]
a = add
br = branch -v
branches = branch -a
brclean = !git branch --merged | grep -v \"\\*\" | xargs -n 1 git branch -d
co = checkout
ci = commit -v
df = diff
vdf = difftool -t vimdiff -y
st = status --branch --short --untracked-files=normal
up = pull --rebase
amend = !git log -n 1 --pretty=tformat:%s%n%n%b | git commit -F - --amend
changeset = !sh -c 'git diff --stat $1^..$1' -
churn = "!f() { git log --format=format: --name-only --since=${1:-12.month} | egrep -v \"^$\" | sort | uniq -c | sort -nr | head -${2:-50}; }; f"
coprev = !git checkout HEAD^
conext = !git checkout `git log --reverse --ancestry-path HEAD..master | head -n 1 | cut -d ' ' -f 2`
cohead = !git checkout `git log --branches -1 --pretty=format:'%D' |cut -d ',' -f 2`
coinit = !git checkout `git log --oneline|tail -n1 |cut -d ' ' -f 1`
ignored = !git status --ignored -s | grep '!!' | cut -d' ' -f2
last = log --abbrev-commit -1 HEAD
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%C(bold blue)<%an>%Creset' --abbrev-commit
ll = log --stat
ls = log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
remotes = remote -v
go = "!f() { git switch -c \"$1\" 2>/dev/null || git switch \"$1\"; }; f"
rup = remote update --prune
tags = tag -l
top = shortlog -nsw -e
unpushed = log --branches --not --remotes --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
unstage = reset HEAD --
vommit = commit
wip = for-each-ref --sort='authordate:iso8601' --format=' %(color:green)%(authordate:relative)%09%(color:white)%(refname:short)' refs/heads
# include additional custom configuration for git users and/or organizations
[include]
path = ~/.dotfiles/._system/custom/.gitconfig