-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitconfig
36 lines (36 loc) · 1.58 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
[user]
name = Sergey Sidorchik
email = s.sidorchick@gmail.com
[pull]
rebase = true
[push]
default = current
[core]
editor = nvim
excludesfile = ~/.gitignore
[diff]
tool = vimdiff
[dofftool]
prompt = false
[difftool]
prompt = false
[alias]
st = status
co = checkout
ci = commit
su = submodule update
mt = mergetool
ro = !"git fetch origin && git rebase origin/master"
del = !"git branch -D $(git for-each-ref --format='%(refname:short)' refs/heads/$1)"
cleanup = !"git branch --merged | grep -v '\\*\\|master\\|develop' | xargs -n 1 git branch -d && git remote prune origin && git clean -fd"
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%C(bold blue)<%an>%Creset' --abbrev-commit
standup = !"git log --reverse --branches --since='$(if [[ "Mon" == "$(date +%a)" ]]; then echo "last friday"; else echo "yesterday"; fi)' --author=$(git config --get user.email) --format=format:'%C(cyan) %ad %C(yellow)%h %Creset %s %Cgreen%d' --date=local"
slist = "stash list"
ssave = "!f() { git stash push -m ${1}; }; f"
sshow = "!f() { git stash show `git stash list | grep ${1} -w | head -1 | awk '{print $1}' | sed 's/:$//'` -p; }; f"
sapply = "!f() { git stash apply `git stash list | grep ${1} -w | head -1 | awk '{print $1}' | sed 's/:$//'`; }; f"
spop = "!f() { git stash pop `git stash list | grep ${1} -w | head -1 | awk '{print $1}' | sed 's/:$//'`; }; f"
sdrop = "!f() { git stash drop `git stash list | grep ${1} -w | head -1 | awk '{print $1}' | sed 's/:$//'`; }; f"
[merge]
tool = vimdiff
conflictstyle = diff3