-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitconfig
executable file
·73 lines (55 loc) · 1.59 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
[alias]
# one-line log
l = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short
a = add
ap = add -p
au = add --update
c = commit --verbose
ca = commit -a --verbose
cm = commit -m
cam = commit -a -m
m = commit --amend --verbose
cfix = commit --amend --no-edit
# list of files changed between mainline and this branch
dmn = diff mainline --name-only
rao = remote add origin
pom = pull origin main
ac = !git add . && git commit -am
pushitgood = push -u origin --all
# finds the ref where master and this branch diverged and attempts
# to rebase from that point on
sb = !git rebase -i $(git merge-base HEAD main)
d = diff
ds = diff --stat
dc = diff --cached
s = status -s
co = checkout
cob = checkout -b
# list branches sorted by last modified
b = "!git for-each-ref --sort='-authordate' --format='%(authordate)%09%(objectname:short)%09%(refname)' refs/heads | sed -e 's-refs/heads/--'"
# list aliases
la = "!git config -l | grep alias | cut -c 7-"
bstats = "!git log --author=$USER --shortstat $BRANCH | \
awk '/^ [0-9]/ { f += $1; i += $4; d += $6 } \
END { printf(\"%d files changed, %d insertions(+), %d deletions(-)\", f, i, d) }'"
path
[user]
name = Gopal Adhikari
email = [email protected]
[includeIf "gitdir:~/pg/"]
path = ~/.dotfiles/gitconfig-play
[core]
excludesfile = ~/.gitignore
pager = diff-so-fancy | less --tabs=4 -RFX
[color]
ui = true
[push]
default = current
[pull]
rebase = true
[gpg]
program = gpg2
[branch]
autosetupmerge = always
[init]
defaultBranch = main