-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
35 lines (33 loc) · 1.04 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
[user]
email = [email protected]
name = Ethkuil
[core]
autocrlf = input
eol = lf
quotepath = off
[alias]
amend = commit --amend -C HEAD
cm = commit -m
ds = diff --staged
sm = stash push -m
# status, stash and stage share the same first 3 letters, which makes tab completion hard to use.
st = status -sb
# reset and restore share the same first 3 letters, which makes tab completion hard to use.
uncommit = reset HEAD~
undo = restore
unstage = reset
# ---
# alias: list all aliases
alias = !git config --get-regexp ^alias\\. | sed -e s/^alias\\.// -e s/\\ /\\ =\\ /
# glog: grep log
glog = "!f() { git log --name-status --grep=$1; }; f"
graph = log --graph --oneline
# refresh: update main branch and update current branch with main
refresh = !git stash -u && git switch main && git pull && git switch - && git rebase main && git stash pop
wip = "!git add -A; git rm $(git ls-files --deleted) 2>/dev/null; git commit --no-verify --no-gpg-sign -m \"--wip-- [skip ci]\""
[push]
default = current
[pull]
rebase = true
[commit]
verbose = true