-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
97 lines (97 loc) · 3.35 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
94
95
96
97
[alias]
aa = add -A
c = commit --verbose
co = checkout
cp = cherry-pick
s = status --short
rc = rebase --continue
br = branch
cached = diff --cached
undo = reset --soft HEAD~1
show-patch = format-patch -1 --stdout
sha = rev-parse HEAD
origin = config --get remote.origin.url
current = rev-parse --abbrev-ref HEAD
out = !git log origin/$(git current)..
incoming = !git log ..origin/$(git current)
publish= !git push origin $(git current)
id = !echo "git clone --recursive $(git origin) --branch $(git current)"
recent = !git for-each-ref --sort=-committerdate --format='%(refname:short)' refs/heads/ | head -n 20
fixup = "!f() { git commit --fixup=$1; git rebase -i --autosquash $1~1; }; f"
fixit = "!f() { git commit --fixup=$1; GIT_SEQUENCE_EDITOR=: git rebase -i --autosquash $1~1; }; f"
wip = !git add --all . && git commit -m 'WIP'
root = !pwd
back = checkout -
upstream = !git branch --set-upstream-to=origin/$(git current) $(git current)
pushup = !git push --set-upstream origin $(git current)
repo=!git remote -v | grep '@.*fetch' | sed 's/.*:\\(.*\\).git.*/\\1/g'
pr=!open https://github.com/$(git repo)/compare/$(git current)?expand=1
ls = !git ls-files -m
#fzf Fuzzy find
ch= !BRANCH=`git recent | fzf` && git checkout ${BRANCH}
fadd= !FILES=`git status -s | awk '{ print $2 }' | fzf -x -m` && git add --all ${FILES}
ffix= !HASH=`git log --pretty=oneline | head | fzf` && git fixit `echo ${HASH} | awk '{ print $1 }'`
fshow= !HASH=`git log --pretty=oneline | head | fzf` && git show `echo ${HASH} | awk '{ print $1 }'`
flog= !HASH=`git log --pretty=oneline | head | fzf` && echo ${HASH} | awk '{ print $1 }' | xargs echo -n | pbcopy
frebase= !HASH=`git log --pretty=oneline | head -n 50 | fzf` && git rebase -i `echo ${HASH} | awk '{ print $1 }'`^
fvim= !FILES=`git status -s | awk '{ print $2 }' | fzf -x -m` && vim ${FILES}
fgrep= !sh -c 'FILES=`git grep -l -A 0 -B 0 $1 $2 | fzf -x -m` && vim `echo ${FILES} | cut -d':' -f1 | xargs`' -
fvimlog= !HASH=`git log --pretty=oneline | head -n 50 | fzf` && HASHZ=`echo ${HASH} | awk '{ print $1 }'` && FILES=`git show --pretty='format:' --name-only $HASHZ | fzf -x -m` && vim ${FILES}
freset= !HASH=`git log --pretty=oneline | head -n 50 | fzf` && git reset --soft `echo ${HASH} | awk '{ print $1 }'`^
prebom = pull --rebase origin master
prebod = pull --rebase origin dev
prebodd = pull --rebase origin develop
fpush = push --force-with-lease
last = log -1 HEAD
diffw = diff --word-diff
wdiff = diff --word-diff
[help]
autocorrect = 30
[credential]
helper = osxkeychain
[core]
excludesfile = ~/.config/lazygit/.gitignore
pager = diff-so-fancy | less --tabs=4 -RFX
editor = nvim
[diff]
tool = delta
[difftool]
prompt = false
[pager]
difftool = true
; diff = diffnav
[pull]
rebase = true
[init]
defaultBranch = master
[interactive]
diffFilter = diff-so-fancy --patch
[color]
ui = true
[color "diff-highlight"]
oldNormal = red bold
oldHighlight = red bold 52
newNormal = green bold
newHighlight = green bold 22
[color "diff"]
meta = 11
frag = magenta bold
func = 146 bold
commit = yellow bold
old = red bold
new = green bold
whitespace = red reverse
[merge]
tool = vimdiff3
[mergetool "vimdiff3"]
path = nvim
[rebase]
autoStash = true
[user]
name = Iain Simmons
email = [email protected]
[includeIf "gitdir:~/dev/Squiz/**"]
path = ~/dev/Squiz/.gitconfig
[rerere]
enabled = true
autoUpdate = true