-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitconfig
55 lines (55 loc) · 1.8 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]
useConfigOnly = true
[push]
default = current
[merge]
ff = false
[pull]
ff = only
[color]
ui = auto
[core]
pager = delta
quotepath = false
[github]
user = mopp
[alias]
difff = diff --relative --name-only
diffh = diff --histogram
diffw = diff --histogram --word-diff --word-diff-regex='\\w+|[^[:space:]]'
graph = log --graph --decorate --oneline --max-count=16
logs = log --stat --decorate --color --graph --pretty=fuller --max-count=16
url = !echo $(git config remote.origin.url | sed -Ee 's!(git@|git://|ssh://)!https://!' -e 's!:([^/])!/\\1!' | sed -e 's/.git$//')
open = !$(command -v open || command -v xdg-open) $(git url)
pr = !$(command -v open || command -v xdg-open) $(git url)/compare/$(git rev-parse --abbrev-ref HEAD)?expand=1
pr-echo = !echo $(git url)/compare/$(git rev-parse --abbrev-ref HEAD)?expand=1
rename = branch -m
select = "!f() { select ans in $(git status --short | awk '{print $2}'); do $EDITOR $ans; break; done }; f"
squeeze = commit --amend --no-edit
unstage = reset HEAD
uncommit = reset --soft HEAD~
pushf = push --force-with-lease origin HEAD
push = push origin HEAD
wip = commit --message 'wip'
pullr = !git pull --rebase $(git symbolic-ref refs/remotes/origin/HEAD --short | tr '/' ' ')
reload = !git reset --hard origin/$(git rev-parse --abbrev-ref HEAD)
[pager]
branch = false
[fetch]
prune = true
[interactive]
diffFilter = delta --color-only
[add.interactive]
useBuiltin = false # required for git 2.37.0
[merge]
conflictstyle = diff3
[diff]
colorMoved = default
[delta]
side-by-side = true
[credential "https://github.com"]
helper =
helper = !gh auth git-credential
[credential "https://gist.github.com"]
helper =
helper = !gh auth git-credential