-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.gitconfig
69 lines (69 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
[filter "lfs"]
clean = git-lfs clean %f
smudge = git-lfs smudge %f
required = true
[core]
autocrlf = input
commentchar = |
[push]
default = simple
[pull]
rebase = true
[rebase]
autosquash = true
[rerere]
enabled = true
[alias]
br = branch
ca = commit --amend
caam = commit --amend -am
cam = commit -am
ci = commit
cl = clone
co = checkout
cp = cherry-pick
df = diff --word-diff
dc = diff --cached
diffr = "!f() { git diff "$1"^.."$1"; }; f"
dl = "!git ll -1"
dlc = diff --cached HEAD^
dr = "!f() { git diff "$1"^.."$1"; }; f"
done = "!f() { git branch | grep "$1" | cut -c 3- | grep -v done | xargs -I{} git branch -m {} done-{}; }; f"
f = "!git ls-files | grep -i"
fixup = "!git log -n 50 --pretty=format:'%h %s' --no-merges | fzf | cut -c -7 | xargs -o git commit --fixup"
fpa = fetch --prune --all
filelog = log -u
fl = log -u
s = status -s
st = status
lg = log --oneline --decorate --all --graph
r = reset
rb = rebase
rbi = rebase -i
rbc = rebase --continue
rba = rebase --abort
r1 = reset HEAD^
r2 = reset HEAD^^
rh = reset --hard
rh1 = reset HEAD^ --hard
rh2 = reset HEAD^^ --hard
unstage = reset HEAD --
last = log -1 HEAD
ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
lnc = log --pretty=format:"%h\\ %s\\ [%cn]"
lds = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short
ld = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=relative
le = log --oneline --decorate
lc = "!f() { git ll "$1"^.."$1"; }; f"
grep = grep -Ii
gr = grep -Ii
gra = "!f() { A=$(pwd) && TOPLEVEL=$(git rev-parse --show-toplevel) && cd $TOPLEVEL && git grep --full-name -In $1 | xargs -I{} echo $TOPLEVEL/{} && cd $A; }; f"
la = "!git config -l | grep alias | cut -c 7-"
lasttag = describe --tags --abbrev=0
lt = describe --tags --abbrev=0
ours = "!f() { git co --ours $@ && git add $@; }; f"
theirs = "!f() { git co --theirs $@ && git add $@; }; f"
sl = stash list
sa = stash apply
ss = stash save