forked from bresilla/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
78 lines (72 loc) · 2.74 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
[user]
email = trim.bresilla@gmail.com
name = Trim Bresilla
signingkey = F337B1747050659CABAAE714177223966B794B54
[core]
pager = delta --dark --plus-color="#012800" --minus-color="#340001" --theme="OneHalfDark"
quotepath = false
commitGraph = true
[credential]
helper = cache --timeout=10000
[color]
ui = true
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = yellow
changed = green
untracked = red
[push]
default = simple
[pull]
rebase = true
[rebase]
autostash = true
[merge]
log = true
ff = false
tool = diffconflicts
[mergetool "diffconflicts"]
cmd = vim -c DiffConflicts \"$MERGED\" \"$BASE\" \"$LOCAL\" \"$REMOTE\"
trustExitCode = true
[mergetool]
keepBackup = false
[alias]
view = !grv
ban = "!fd -E ".git" -H . | fzf | parallel 'git ignore {}; git rm -rf --cached {};'"
uncommit = reset --soft HEAD^
master = "!git checkout master || git checkout main"
main = "!git checkout main || git checkout master"
develop = checkout develop
hub = "!f(){ gh $@; }; f"
module = submodule
check = checkout
clone = clone --recursive
pub = "!f(){ git push ${1:-origin} --follow-tags; }; f"
fuse = "!f(){ current=$(git branch --show-current); git checkout $1 && git merge $current && git checkout $current; }; f"
sshify = "!f(){ [[ $(git remote -v | awk 'NR==1{print $2}' | awk -F'/' '/com/ {print $1}') == "https:" ]] && gitname=$(git remote -v | awk 'NR==1{print $2}' | awk -F'/' '{print $4,$5}' | sed 's! !/!g') && git remote set-url origin git@github.com:$gitname.git; }; f"
get = "!f(){ INPUT=${1:-$(xsel --clipboard)}; NAMEEE=$(echo $INPUT | cut -d/ -f1-5); git clone --recursive $NAMEEE; }; f"
down = "!f(){ INPUT=${1:-$(xsel --clipboard)}; NAMEEE=$(echo $INPUT | cut -d/ -f1-5); git clone --recursive $NAMEEE -- /home/$USER/down/$(echo $NAMEEE | cut -d/ -f5); }; f"
unfuck = "!f(){ git reset --hard origin/`git rev-parse --abbrev-ref HEAD`; rm -fv `git st | grep ^? | cut -d' ' -f2-`; }; f"
tree = log --graph --all --format=format:'%w(80,0,0)%C(bold magenta)%h%C(reset) %C(white)%ad%C(reset) %C(dim white)(%ar)%C(reset) %C(bold dim white)%aN%C(auto)%+D%C(reset)%n%C(bold white)%s%C(reset)%+b%n'
open = "!f(){ hub browse; }; f"
remotes = remote -v
all = branch -a
conflicts = !git diff --name-only --diff-filter=U
fix = !git mergetool --tool=diffconflicts
root = rev-parse --show-toplevel
ignore = "!f(){ echo $@ >> .gitignore; }; f"
set = "!git add --all && git commit"
[gc]
writeCommitGraph = true
[commit]
gpgsign = true
[init]
defaultBranch = main