-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
74 lines (74 loc) · 2.17 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
[user]
name = Arturo Herrero
email = [email protected]
[color]
ui = auto
[alias]
amend = commit --amend --no-edit
br = branch
branches = branch -a
ca = !git add -A && git commit -v
cap = !git add -A && git pair
ci = commit -v
co = checkout
cob = checkout -b
diffs = diff --staged
discard = "!git reset --hard origin/$(git branch --show-current)"
head = checkout -- .
hist = log --graph --pretty=format:'%C(yellow)%h%C(reset) -%C(auto)%d %s %C(green)(%cr) %C(bold blue)<%an>'
integrate = !git checkout master && git merge $1 && git push && git remove-remote-and-local $1
jump = !git stash && git checkout $1 && shift && git stash pop
last = log -1 HEAD
lg = log --graph --pretty=format:'%C(auto)%h %s %C(bold blue)<%an>'
lg5 = lg -5
merged = !git branch --merged origin/master | grep -v -e '^ master$' -e '^* master$'
pair = !git commit -v -t ~/.gitpair
push-branch = "!f() { git push --set-upstream $1 $(git branch --show-current); }; f"
remotes = remote -v
remove = "!f() { git branch -D $@; }; f"
remove-local-merged = !git merged | xargs git remove
remove-remote-and-local = !git push origin --delete $1; git remove $1
remove-remote-merged = !git remote update -p && git branch -r --merged origin/master | grep origin | grep -v master | cut -d"/" -f2- | xargs git push origin --delete
st = status
stashes = stash list
stashp = stash pop
stashu = stash -u
stats = shortlog -sn --no-merges
tags = tag -l
undo = reset HEAD^ --mixed
unstage = reset HEAD --
up = "!git remote update -p; git merge --ff-only @{u}"
[core]
excludesfile = ~/.gitignore
whitespace = tab-in-indent
pager = diff-so-fancy | less --tabs=4 -RFX
[help]
autocorrect = 1
[push]
default = simple
autoSetupRemote = true
[pull]
ff = only
[merge]
ff = only
log = true
[color "diff-highlight"]
oldNormal = red bold
oldHighlight = red bold 52
newNormal = green bold
newHighlight = green bold 22
[color "diff"]
meta = 227
frag = magenta bold
commit = 227 bold
old = red bold
new = green bold
whitespace = red reverse
[tag]
sort = version:refname
[rebase]
autosquash = true
[checkout]
defaultRemote = origin
[init]
defaultBranch = main