-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitconfig
94 lines (90 loc) · 3.13 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
[user]
name = Ofer Segev
email = [email protected]
[core]
excludesfile = /Users/ofs/.gitignore_global
editor = /usr/bin/vim
pager = less -FX
[branch "master"]
rebase = true
[branch "upstream"]
rebase = true
[branch]
autosetuprebase = always
[color]
branch = auto
diff = auto
status = auto
ui = true
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = yellow
changed = green
untracked = cyan
[rebase]
autoStash = true
[alias]
story = log --graph --abbrev-commit --decorate --date=relative
graph = log --graph --full-history --all --color --pretty=tformat:"%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s%x20%x1b[33m(%an)%x1b[0m"
tree1 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)'
tree2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)'
tree = !"git tree1"
grep-log = "!git log --pretty=oneline --grep \"$1\" #"
greplog = "!git log --pretty=oneline --grep \"$1\" #"
tmp = "!git commit --no-verify -m \"TMP\" #"
at = "!git add . && git commit --no-verify -m \"TMP\" #"
me = log --author="[email protected]"
s = status
a = add
ap = add -p
d = diff
r = reset
c = "!git commit -m \"$1\" #"
ca = commit -a -m
co = checkout
b = "!git branch && printf \"\n* \" && git rev-parse --abbrev-ref HEAD && printf \"\n\" #"
l = "!git tree1 #"
l1 = "! git log -1 #"
l2 = "! git log -2 #"
l3 = "! git log -3 #"
l4 = "! git log -4 #"
l5 = "! git log -5 #"
ll = "! git log origin/master..@ --oneline --graph #"
branches = branch -a
stashes = stash list
st = "!git stash push -u -m \"$1\" #"
sp = "!git stash pop #"
pick = cherry-pick
cp = cherry-pick
ds = diff --staged
cpc = cherry-pick --continue
discard = "!git checkout -- \"$1\" #"
pf = "!git push --force #"
unstage = "!git reset HEAD \"$1\" #"
untrack = "!git reset HEAD \"$1\" #"
drop = "!git reset @~ --hard #"
amend = commit --amend
melt = commit --amend --no-edit
files = "!git show @ --name-only #"
rename = commit --amend
rephrase = "!git commit -F .git/COMMIT_EDITMSG -e #"
contains = "!git branch -r --contains \"$1\" #"
ignore-locally = update-index --skip-worktree
unignore-locally = update-index --no-skip-worktree
find-commit = "!git log -S \"$1\" --source --all #"
who-deleted = "!git log -1 -- \"$1\" #"
who-created = "!git log \"$1\" | grep Author | tail -1 | cut -c 9- && git log --pretty=oneline \"$1\" | tail -1 #"
search = "!git log -i -p -S\"$1\" --pretty=oneline #"
regex = "!git log -ia-p -G$1 --pretty=oneline #"
rc = "!git rebase --continue #"
ri = "!git rebase origin/master -i #"
fri = "!git fetch && git rebase origin/master #"
stash-rename = "!_() { rev=$(git rev-parse $1) && git stash drop $1 || exit 1 ; git stash store -m \"$2\" $rev; }; _"