-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
75 lines (64 loc) · 2.47 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
[user]
name = Vlad
email = vlad@ghn.me
signingkey = ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPwZUfOsgyoWSBnfwIh+8dEIeeHk21staKptIGqIWCeI
[credential]
helper = osxkeychain
[gpg]
format = ssh
[gpg "ssh"]
program = "/Applications/1Password.app/Contents/MacOS/op-ssh-sign"
[commit]
gpgsign = true
[alias]
al = !git config --get-regexp alias
st = !git fetch --all --prune && git status
co = checkout
aa = !"git add -A; git ls-files --deleted -z | xargs -0 rm -f"
cm = commit -v
cs = commit -S -v
br = branch -av
ba = branch --all
nb = checkout -b
mg = merge --no-ff
sl = stash list
sa = stash apply
sp = stash pop
ss = stash save
df = diff HEAD
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative --all --decorate
stp = !git pull --all --prune && git status
pup = !git push --set-upstream origin $(git symbolic-ref --short HEAD)
cmm = !"git add -A; git ls-files --deleted -z | xargs -0 rm -f; git commit -s -m"
csm = !"git add -A; git ls-files --deleted -z | xargs -0 rm -f; git commit -S -v -m"
csa = !"git add -A; git ls-files --deleted -z | xargs -0 rm -f; git commit -S -v"
wip = !"git add -A; git ls-files --deleted -z | xargs -0 rm -f; git commit -m \"WIP\""
unwip = !"git log -n 1 | grep -q -c WIP && git reset HEAD~1"
deploy = "!f(){ git checkout $2 && git merge --gpg-sign --no-ff $1 && git push && git co $1 && git rebase $2 ;}; f $(git symbolic-ref --short HEAD) ${1-master}"
countbase = "!f() { compareBranch=${1-master}; git rev-list --count HEAD ^$compareBranch; }; f"
squashbase = "!f() { branchName=${1-master}; commitCount=$(git countbase $branchName); git rebase -i HEAD~$commitCount; }; f"
pullbase = "!f() { branchName=${1-master}; git checkout $branchName && git pull && git checkout - && git rebase -i $branchName; }; f"
updatefork = !"git checkout master && git fetch upstream master && git merge upstream/master && push master"
undo = reset --soft HEAD^
[core]
autocrlf = false
excludesfile = ~/.gitignore.global
[color]
ui = auto
diff = auto
status = auto
branch = auto
interactive = auto
grep = auto
[pull]
rebase = false
[push]
default = tracking
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
# Optional includes (https://git-scm.com/docs/git-config#_conditional_includes)
[includeIf "gitdir:~/work/"]
path = ~/.work.gitconfig