-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
51 lines (49 loc) · 1.73 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
[user]
email = alperor@gmail.com
name = Alper Orus
[alias]
# status short & branch
s = status -s -b
# add, commit
ac = !git add -A && git commit -m
# add, commit, push
acp = "!f() { git add -A && git commit -m \"$@\" && git push; }; f"
# get all new content
get = !git pull --rebase && git submodule update --init --recursive
# what changed (detailed log)
w = whatchanged
# log
l = log
# log simpler
lol = "log --graph --decorate --oneline"
# log simple
logd = "log --date-order --all --graph --format='%C(green)%h%Creset %C(yellow)%an%Creset %C(blue bold)%ar%Creset %C(red bold)%d%Creset%s'"
# log fancy
logf = "log --date-order --all --graph --name-status --format='%C(green)%H%Creset %C(yellow)%an%Creset %C(blue bold)%ar%Creset %C(red bold)%d%Creset%s'"
# what have i changed since yesterday
logg = !git log --since yesterday --pretty=short --author `git config user.email`
# Git last commit
last = "log -1 HEAD --stat"
# Git search commit
se = "!git rev-list --all | xargs git grep -F"
# older shorrtcuts
ci = commit
cp = commit-and-push
cp = checkout
fixyp = commit --fixup
mend = commit --amend
pop = reset HEAD^
fp = fpush
fu = fetch upstream
fo = fetch origin
lg = log --color --graph --pretty=format:'%Cgreen%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
ls = log --pretty=format:"%C(yellow)%h\\ %Creset%s%Cblue\\ [%cn]\\%Cred%d" --decorate
ll = ls --numstat
r = rebase
ra = rebase --abort
rc = rebase --continue
rs = rebase --skip
ri = rebase --interactive
st = status -sb
prune-merged = "!git branch --merged | grep dm/ | grep -v "\\*" | xargs -n1 git branch -d"
ignore = "!f() { echo \"$1\" >> .gitignore; }; f"