-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
61 lines (59 loc) · 2.18 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
[alias]
fpush = push --force-with-lease
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
merged=!"git branch --merged | grep -v \"\\*\" | grep -v \"main\" |grep -v \"master\" | grep -v \"develop\" | xargs -n 1 git branch -d && git remote prune origin"
set-upstream=!"git branch | grep \"*\" | sed \"s/* //\" | awk '{print \"origin/\"$1}' | xargs git branch --set-upstream-to && git pull"
sha = rev-parse HEAD
unwip = !"git log -n 1 | grep -q -c WIP && git reset HEAD~1"
wip = !"git add -A; git ls-files --deleted -z | xargs -0 git rm; git commit -m \"WIP\" --no-verify"
# Bitbucket
bucket = "!open \"$(git remote -v | grep origin | grep push | cut -f 2 | cut -d \" \" -f 1 | sed -e \"s|ssh://git@\\(.*\\):\\(.*\\).git|http://\\1/\\2|\" | sed -e \"s|\\/7999\\/\\([a-z-]*\\)\\/\\([a-z-]*\\)|:7990/projects/\\1/repos/\\2|\")/\""
# Github
hub = "!open \"$(git remote -v | grep origin | grep push | cut -f 2 | cut -d \" \" -f 1 | sed -e \"s|git@\\(.*\\):\\(.*\\).git|https://\\1/\\2|\")/\""
pulls = "!open \"$(git remote -v | grep origin | grep push | cut -f 2 | cut -d \" \" -f 1 | sed -e \"s|git@\\(.*\\):\\(.*\\).git|https://\\1/\\2|\")/pulls\""
pr = "!open \"$(git remote -v | grep origin | grep push | cut -f 2 | cut -d \" \" -f 1 | sed -e \"s|git@\\(.*\\):\\(.*\\).git|https://\\1/\\2|\")/pull/new/$(git rev-parse --abbrev-ref HEAD)\""
[branch]
autosetuprebase = always
[color]
ui = auto
[core]
editor = vim
autocrlf = input
excludesfile = ~/dotfiles/.gitignore_global
pager = delta
[credential]
helper = osxkeychain
[delta]
syntax-theme = base16
navigate = true
line-numbers = true
side-by-side = true
light = false
[diff]
colorMoved = default
[difftool]
prompt = false
[fetch]
prune = true
[filter "lfs"]
clean = git-lfs clean %f
smudge = git-lfs smudge %f
required = true
[init]
defaultBranch = trunk
[interactive]
diffFilter = delta --color-only
[merge]
conflictstyle = diff3
[pull]
rebase = true
[push]
default = current
[rebase]
autoStash = true
[user]
email = [email protected]
name = Dean Marano
useconfigonly = true
[mergetool]
keepBackup = false