This repository has been archived by the owner on May 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
.gitconfig
61 lines (56 loc) · 2.22 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
[user]
email = [email protected]
name = Trim Bresilla
[core]
pager = delta --dark --plus-color="#012800" --minus-color="#340001" --theme="OneHalfDark"
[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 = checkout master
develop = checkout develop
module = submodule
clone = clone --recursive
sshify = "!f(){ [[ $(git remote -v | awk 'NR==1{print $2}' | awk -F'/' '/com/ {print $1}') == "https:" ]] && git remote -v | awk 'NR==1{print $2}' | awk -F'/' '{print $4,$5}' | export read username reponame && git remote set-url origin [email protected]:$username/$reponame.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'
publish = "!f(){ git push origin --follow-tags $1 && git checkout develop && hub browse; }; f"
open = "!f(){ hub browse; }; f"
remotes = remote -v
branches = branch -a
conflicts = !git diff --name-only --diff-filter=U
fix = !git mergetool --tool=diffconflicts