forked from benoitgrelard/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
42 lines (40 loc) · 1.8 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
[credential]
helper = osxkeychain
[user]
name = Pete Correia
email = [email protected]
[core]
editor = code --wait
excludesfile = /Users/petecorreia/.gitignore_global
autocrlf = input
[alias]
st = status
cm = commit -a -m
cmp = "!f() { git add . && git commit -m \"$@\" && git push; }; f"
ca = commit -a -m
co = checkout
br = branch
ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
lds = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short
ld = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=relative
f = "!git ls-files | grep -i"
la = "!git config -l | grep alias | cut -c 7-"
diff = diff --word-diff
url =! bash -c 'git config --get remote.origin.url | sed -E "s/.+:\\(.+\\)\\.git$/https:\\\\/\\\\/github\\\\.com\\\\/\\\\1/g"'
branch-name-clean =! bash -c 'git rev-parse --abbrev-ref HEAD | sed -E "s/\\\\//\\\\\\\\\\\\//g"'
urlb =! bash -c 'git url | sed -E "s/\\(.+\\)/\\\\1\\\\/tree\\\\/`git branch-name-clean`/"'
hub =! bash -c 'git url | xargs open'
hubb =! bash -c 'git urlb | xargs open'
pr =! bash -c 'git url | sed -E "s/\\(.+\\)/\\\\1\\\\/compare\\\\/`git branch-name-clean`?expand=1/" | xargs open'
cleanup =! bash -c 'git branch --merged main | grep -v \"\\* main\" | xargs -n 1 git branch -d'
cleanup-develop =! bash -c 'git branch --merged develop | grep -v \"\\* develop\" | xargs -n 1 git branch -d'
cleanup-hard =! bash -c 'git branch | grep -v \"\\* main\" | xargs -n 1 git branch -D'
branch-name = "!git rev-parse --abbrev-ref HEAD"
publish = "!git push -u origin $(git branch-name)"
[push]
default = simple
[diff "sopsdiffer"]
textconv = sops -d
[pull]
rebase = false