-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitconfig
55 lines (55 loc) · 2 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
[user]
name = Tyler
email = 26290074+thegitduck@users.noreply.github.com
[alias]
a = add
st = status
c = commit
cm = commit -m
cmn = "!f(){ git commit -m \"$1\" --no-verify; }; f"
ca = commit --amend
cs = commit --no-verify -am "save"
caa = commit -a --amend -C HEAD
caan = commit -a --amend -C HEAD --no-verify
co = checkout
cob = checkout -b
com = !git checkout $(git main)
rb = rebase
rbi = "!f(){ git rebase -i HEAD~$1; }; f"
rbc = rebase --continue
rbom = !git rebase origin/$(git main)
rsom = !git reset --soft origin/$(git main)
rs = reset --soft
f = fetch
prune = fetch --prune --all
tp = !git tag -l | xargs git tag -d && git fetch -t
b = branch
ba = branch -a
bd = branch -d
bm = branch -m
bclean = "!f(){ git branch | grep -v $(git main) | xargs git branch -D & git fetch --prune --all; }; f"
l = pull
lr = pull --rebase
p = push
pf = push -f
pub = !git push -u origin $(git this)
pubc = !git push -u origin $(git this) -o create.mr # publish branch and auto create merge request (Gitlab)
unpub = !git push origin :$(git this)
lol = log --graph --decorate --pretty=oneline --abbrev-commit
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
ls = log --oneline
cp = "!f(){ git log --pretty=format:'%s' -1 | pbcopy; }; f"
deploy = "!f(){ git subtree push --prefix $1 origin gh-pages; }; f"
main = !git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@' # detect main branch of current repo
this = rev-parse --abbrev-ref HEAD # current branch that you are on
mru = "!git log -g -n 1000 --format=\"%gd %gs\" --date=relative HEAD@{now} | grep checkout | grep \" to\" | sed 's/HEAD@{\\(.*\\)}.* to\\(.*\\)/(\\1)\\t\\2/' | awk -v OFS=' ' '!x[$NF]++' | head -n 15 | column -ts $'\\t'"
[core]
editor = vim
[pull]
rebase = false
[push]
default = current
[init]
defaultBranch = main
[advice]
skippedCherryPicks = false