-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
86 lines (85 loc) · 2.15 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
[core]
excludesfile = $HOME/.gitignore_global
attributesfile = $HOME/.gitattributes
autocrlf = input
editor = /usr/local/bin/vim
[diff]
tool = pycharm
[difftool "pycharm"]
cmd = charm diff "$LOCAL" "$REMOTE" && echo "Press enter to continue..." && read
[difftool "vimdiff"]
prompt = false
[mergetool "vimdiff"]
prompt = false
[user]
name = Shintaro Tanaka
email = [email protected]
[commit]
template = ~/.stCommitMsg
[diff "xlsx"]
binary = true
textconv = $GOPATH/bin/git-xlsx-textconv
[alias]
p = !git push origin `git rev-parse --abbrev-ref HEAD`
pn = push --no-verify
pf = push -f
pnf = push -f --no-verify
####
s = status
sb = status -s -b
####
o = checkout
ob = checkout -b
of = !git branch -a | fzf | xargs git checkout
a = !git status -s | fzf -m | awk '{print $2}' | xargs git add
fe = "!f() { \
git checkout -b feature/$1;\
}; f"
rs = restore
# obf = "!read -p 'feature/' feat; git checkout -b feature/$feat"
####
c = commit
cm = commit -m
ca = commit -a
cam = commit -am
cd = commit --amend
####
ss = stash save
# sp = stash pop
sa = stash apply
####
f = fetch
fo = fetch origin
####
rb = rebase
rba = rebase --abort
rbc = rebase --continue
rbi = rebase --interactive
rbs = rebase --skip
cp = cherry-pick
cpa = cherry-pick --abort
cpc = cherry-pick --continue
####
df = diff --word-diff
dt = difftool
unstage = reset HEAD
####
b = branch
bm = branch -m
ba = branch -a
bd = branch -d
bdd = branch -D
repull = "!f(){ git branch -D $1 && git checkout -b $1;};f"
####
today = log --oneline --branches --since=midnight --date=iso --author="$(git config user.name)" --format="- %s"
l = log --oneline
gr = log --graph --date=short --decorate=short --pretty=format:'%Cgreen%h %Creset%cd %Cblue%cn %Cred%d %Creset%s'
rename = branch -m
dev = !git checkout $(git config dev.main)
[tig "bind"]
diff = F ?!git commit --fixup %(commit)
diff = S ?!git commit --squash %(commit)
main = F ?!git commit --fixup %(commit)
main = S ?!git commit --squash %(commit)
main = B !git rebase -i %(commit)
diff = B !git rebase -i %(commit)