-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
76 lines (64 loc) · 2.11 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
[include]
path = /home/zander/.gitconfig.local
[commit]
gpgsign = true
[core]
pager = delta
editor = nvim
[color]
ui = true
[interactive]
diffFilter = delta --color-only --line-numbers
[add.interactive]
useBuiltin = false # required for git 2.37.0
[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
line-numbers = true
syntax-theme = OneHalfDark
zero-style = syntax dim
minus-style = syntax bold auto
[merge]
conflictstyle = diff3
[diff]
colorMoved = default
[pull]
rebase = true
[push]
autoSetupRemote = true
# aliases
[alias]
# list aliases
aliases = !git config --list | grep 'alias\\.' | sed 's/alias\\.\\([^=]*\\)=\\(.*\\)/\\1\\ \t => \\2/' | sort
# Unstage changes from the index
unstage = reset HEAD --
# show git log history
g = !git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %C(bold blue)<%an>%Creset %Cgreen(%cr)%Creset %s' --abbrev-commit --date=relative --all
# small log output
l = !git log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %C(bold blue)<%an>%Creset %Cgreen(%cr)%Creset %s' --abbrev-commit --date=relative -n 10
la = !git log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %C(bold blue)<%an>%Creset %Cgreen(%cr)%Creset %s' --abbrev-commit --date=relative -n 10 --all
lag = !git log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %C(bold blue)<%an>%Creset %Cgreen(%cr)%Creset %s' --abbrev-commit --date=relative -n 10 --all --graph
# make new branch and check it out
nb = checkout -b
# add all files to staging
a = add -u .
# commit with a message
cm = commit -m
# checout branch
c = checkout
# list branches
b = branch -av
# remove branch
rmb = branch --delete --force
# status
s = status
# push
p = push
# force push
fp = push --force-with-lease
# push tags
pt = push --tags
# clean interactively
ci = clean -i
# get sha of last commit on current branch
sha = rev-parse HEAD