-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
72 lines (71 loc) · 1.96 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
[ghq]
root = ~/git
[core]
excludesfile = ~/.gitignore
quotepath = false
[user]
name = swamp09
email = [email protected]
[alias]
alias = !git config --get-regexp '^alias\\.' | sed 's/alias\\.\\([^ ]*\\) \\(.*\\)/\\1\\\t => \\2/' | sort
ad = add
ap = add -p
b = branch -a
br = branch --sort=authordate -v
brd = branch -D
rename-branch = branch -m
ci = commit -v
ca = commit -v --amend
cn = commit -v --amend --no-edit
co = checkout
cob = checkout -b
co-my-branch = "!bt() { git checkout -b swamp09/$1;}; bt"
com = "!f() { git rev-parse --verify master >/dev/null 2>&1 && git checkout master || git checkout main; }; f"
cp = cherry-pick
dm = diff master
dw = diff --color-words
ds = diff --staged
f = fetch --prune
get = !ghq get -p
list = !ghq list
fp = push --force-with-lease
l = log --decorate
lr = log --reverse --decorate
lp = log -p --stat --decorate
one = log --oneline
graph = log --graph --all --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
pom = "!f() { git rev-parse --verify master >/dev/null 2>&1 && git pull origin master || git pull origin main; }; f"
pum = pull upstream master
unstage = reset HEAD --
uncommit = reset --soft HEAD~
uc = reset --soft HEAD~
rs = reset --soft
rh = reset --hard
re = remote -v
add-upstream = remote add upstream
rb = rebase -i
rbc= rebase --continue
st = status
add-origin = remote add origin
t = tag -l
[color]
status = auto
diff = auto
branch = auto
interactive = auto
[diff]
indentHeuristic = true
[pull]
rebase = true
[push]
default = current
[rebase]
autostash = true
[rerere]
enabled = true
[browse-remote "github.com"]
top = https://{host}/{path}
ref = https://{host}/{path}/tree/{short_ref}
rev = https://{host}/{path}/commit/{commit}
pr = https://{host}/{path}/pull/{short_ref}
file = "https://{host}/{path}/{file.directory? and :tree or :blob}/{short_rev}/{file}{lines && \"#L%s\" % lines.join(\"-\")}"