-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgitconfig
More file actions
64 lines (64 loc) · 2.44 KB
/
gitconfig
File metadata and controls
64 lines (64 loc) · 2.44 KB
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
[core]
editor = nvim
excludesfile = /Users/bliof/local/dotfiles/git-global-ignore
[user]
name = Aleksandar Ivanov
email = aivanov92@gmail.com
signingkey = 1404AF30CC6873B8
[color]
ui = auto
[color "diff"]
meta = 62 bold
commit = 28 bold
frag = 54 bold
old = 160
new = 34 bold
whitespace = 160 reverse
[color "diff-highlight"]
oldNormal = 160
oldHighlight = 124 224
newNormal = 34
newHighlight = 22 bold 194
[pager]
diff = diff-so-fancy | less --tabs=1,5 -RFX
show = diff-so-fancy | less --tabs=1,5 -RFX
[push]
default = simple
[pull]
rebase = preserve
[branch]
autosetuprebase = always
[merge]
tool = vimdiff
ff = no
[alias]
# Fancy logging.
# h = head
# hp = head with patch
# r = recent commits, only current branch
# ra = recent commits, all reachable refs
# l = all commits, only current branch
# la = all commits, all reachable refs
head = !git r -1
h = !git head
hp = "!. ~/.githelpers && show_git_head"
r = !GIT_NO_PAGER=1 git l -30
ra = !git r --all
l = "!. ~/.githelpers && pretty_git_log"
la = !git l --all
default-branch = ![ -f "$(git rev-parse --show-toplevel 2>/dev/null)/.git/refs/heads/main" ] && echo main || echo master
review = !git stash && git fetch origin $1 && (git branch -m $1 tmp-review-$1-$(date +%Y-%m-%d-%H-%M-%S) || :) && git checkout -b $1 origin/$1 && :
nuke-review-tmp = !git branch | grep 'tmp-review' | xargs git branch -D
changes = !BRANCH="${1:-$(git branch-name)}" && git diff --name-only $(git merge-base $(git default-branch) "$BRANCH") "$BRANCH"
branch-name = !git rev-parse --abbrev-ref HEAD
mm = !BRANCH="${1:-$(git branch-name)}" && git checkout $(git default-branch) && git pull origin $(git default-branch) && git checkout "$BRANCH" && git rebase $(git default-branch)
ba = for-each-ref --sort=committerdate refs/heads/ --format='%(color: red)%(committerdate:short) %(color: cyan)%(refname:short)'
b = for-each-ref --sort=committerdate refs/heads/ --format='%(committerdate:short) %(refname:short)'
fame = !python -m gitfame
count-lines = "! git log --author=\"$1\" --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf \"added lines: %s, removed lines: %s, total lines: %s\\n\", add, subs, loc }' #"
[gpg]
program = gpg
[url "ssh://git@github.com/"]
insteadOf = https://github.com/
[commit]
gpgsign = true