-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
54 lines (53 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
[alias]
co = checkout
cm = checkout master
ci = commit
st = status
stl = stash list
sm = submodule
smu = submodule foreach git pull origin master
leaderboard = shortlog -sne
lol = log --oneline --graph --all --decorate
what = !git fetch && git diff master origin/master
recent = for-each-ref --count=10 --sort=-committerdate refs/heads/ --format="%(refname:short)"
overview = log --all --since='2 weeks' --oneline --no-merges
popular = !git log --all -M -C --name-only --format='format:' "$@" | sort | grep -v '^$' | uniq -c | sort | awk 'BEGIN {print "count,file"} {print $1 "," $2}'
today = !git log --all --since=00:00:00 --oneline --no-merges --author=${1-$(git config user.email)}
this-month = !git log --reverse --pretty=format:'%cd %h %s' --date=short --no-merges --since=$(date +\"%Y-%m-01\") --author=$(git config user.email)
last-month = !git log --reverse --pretty=format:'%cd %h %s' --date=short --no-merges --since=$(date -d \"$(date +%Y-%m)-01 last month\" \"+%Y-%m-01\") --author=$(git config user.email)
[commit]
template = ~/.git_template/commit_message
[color]
ui = auto
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
whitespace = red reverse
[color "status"]
added = green bold
changed = yellow bold
untracked = red bold
[core]
editor = vim
excludesfile = ~/.git_template/gitignore
pager = diffr --colors refine-added:background:green:bold --colors refine-removed:background:red:bold --colors refine-added:foreground:white:bold --colors refine-removed:foreground:white:bold | less -R
[init]
templatedir = ~/.git_template
defaultBranch = main
[push]
default = simple
[user]
name = Michal Zuber
email = [email protected]
# https://git-template.readthedocs.io/en/latest/hooks/junk-checker/
# Enable in repo with
# git config --add hooks.enabled-plugins junkchecker
# cp $HOME/.git_template/hooks .git/hooks
[hooks "junkchecker"]
phrasesfile = $HOME/.git_template/junk
[pull]
ff = only
[interactive]
difffilter = diffr --colors refine-added:background:green:bold --colors refine-removed:background:red:bold --colors refine-added:foreground:white:bold --colors refine-removed:foreground:white:bold