-
Notifications
You must be signed in to change notification settings - Fork 3
/
gitconfig
92 lines (91 loc) · 2.81 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
[user]
name = Paul Redmond
email = paulrredmond@gmail.com
signingkey = ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID8kYpLCoChhaPaTcgw+CxSBM4yyoSAmkpgKR52jMVwU
[gpg]
format = ssh
[gpg "ssh"]
program = "/Applications/1Password.app/Contents/MacOS/op-ssh-sign"
[core]
excludesfile = ~/.gitignore
editor = subl -n -w
autocrlf = input
ignorecase = false
[commit]
template = ~/.gitmessage
gpgsign = true
[color]
ui = true
diff = auto
status = auto
branch = auto
[branch]
autosetuprebase = always
[alias]
ci = commit
b = branch
br = branch
co = checkout
s = status
st = status
up = pull --rebase
mt = mergetool
undo = reset --hard
cp = cherry-pick
d = diff
dc = diff --cached
lg = log -p
dsf = "!git diff --color $@ | diff-so-fancy"
au = add -u # Add changed files, but not new ones.
uncommit = reset --soft HEAD~1
unstage = reset HEAD
amend = commit --amend
pop = stash pop
last = log -1 HEAD --numstat
branchdate = !git for-each-ref --sort='-authordate' --format='%(refname)%09%(authordate)' refs/heads | sed -e 's-refs/heads/--'
dtag = !git tag -a release-`date +%Y%m%d%H%M`
forget="!git fetch -p && git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -D"
forgetlist="! git fetch -p && git branch -vv | awk '/: gone]/{print $1}'"
graph = log --graph --pretty=oneline --abbrev-commit
# List commits in short form
ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate
# List commits showing changed files
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
le = log --oneline --decorate
fshow = ! sh -c 'git show --pretty="format:" --name-only $1 | grep -v "^$" | uniq | sed -e "s#^#`git rev-parse --show-toplevel`/#"'
# List aliases
la = "!git config -l | grep alias | cut -c 7-"
graphviz = "!f() { echo 'digraph git {' ; git log --pretty='format: %h -> { %p }' \"$@\" | sed 's/[0-9a-f][0-9a-f]*/\"&\"/g' ; echo '}'; }; f"
plog = log --pretty=format:\"%h %Cblue%cr%Creset %cn %Cgreen%s%Creset\"
r = reset
nah = "!f(){ git reset --hard; git clean -df; if [ -d ".git/rebase-apply" ] || [ -d ".git/rebase-merge" ]; then git rebase --abort; fi; }; f"
[diff]
tool = opendiff
[mergetool]
keepBackup = false
[merge]
tool = opendiff
[hub]
protocol = https
[help]
autocorrect = 1
[push]
default = simple
autoSetupRemote = true
[credential]
helper = cache --timeout=999999
[url "git@bitbucket.org:"]
insteadOf = https://bitbucket.org/
# [url "https://"]
#insteadOf = git://
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[pager]
branch = false
[init]
defaultBranch = main
[log]
date = rfc-local