-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitconfig
More file actions
93 lines (93 loc) · 2.83 KB
/
Copy path.gitconfig
File metadata and controls
93 lines (93 loc) · 2.83 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
[user]
name = Arturo Herrero
email = arturo.herrero@gmail.com
[alias]
amend = commit --amend --no-edit
br = branch
branches = branch -a
ca = !git add -A && git commit
cap = !git add -A && git pair
ci = commit
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 = "!f() { base=$(git rev-parse --verify origin/main >/dev/null 2>&1 && echo main || echo master); git checkout $base && git merge $1 && git push && git remove-remote-and-local $1; }; f"
jump = "!f() { git stash && git checkout $1 && git stash pop; }; f"
last = log -1 HEAD
lg = log --graph --pretty=format:'%C(auto)%h %s %C(bold blue)<%an>'
lg5 = lg -5
merged = "!f() { git fetch -p >/dev/null 2>&1; git branch -vv | grep ': gone]' | awk '{print $1}'; }; f"
nuke = reset --hard HEAD^
pair = !git commit -t ~/.gitpair
push-branch = "!f() { git push --set-upstream $1 $(git branch --show-current); }; f"
remotes = remote -v
remove = "!f() { git branch --list \"$@\" | sed 's/^..//' | grep -v '^\\(master\\|main\\)$' | xargs git branch -D; }; f"
remove-local-merged = !git merged | xargs git remove
remove-remote-and-local = "!f() { git push origin --delete $1 && git remove $1; }; f"
remove-remote-merged = "!f() { base=$(git rev-parse --verify origin/main >/dev/null 2>&1 && echo main || echo master); git remote update -p && git branch -r --merged origin/$base | grep origin | grep -v $base | cut -d/ -f2- | xargs git push origin --delete; }; f"
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 fetch; git merge --ff-only @{u}"
[branch]
sort = -committerdate
[checkout]
defaultRemote = origin
[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
[commit]
verbose = true
[core]
excludesfile = ~/.gitignore
whitespace = tab-in-indent
pager = diff-so-fancy | less --tabs=4 -RFX
[interactive]
diffFilter = diff-so-fancy --patch
[diff]
algorithm = histogram
colorMoved = plain
mnemonicPrefix = true
renames = true
[fetch]
prune = true
pruneTags = true
[help]
autocorrect = prompt
[init]
defaultBranch = master
[merge]
ff = only
log = true
conflictstyle = zdiff3
[push]
autoSetupRemote = true
followTags = true
[pull]
ff = only
[rebase]
autosquash = true
autoStash = true
updateRefs = true
[rerere]
enabled = true
autoupdate = true
[tag]
sort = version:refname