-
Notifications
You must be signed in to change notification settings - Fork 8
/
.gitconfig
83 lines (83 loc) · 3.54 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
79
80
81
82
83
[user]
name = Grégoire Pineau
email = [email protected]
[alias]
st = status
ci = commit
cim = commit -m "--"
co = checkout
br = branch -v
bra = branch -v -a
brc = ! git branch --no-color --merged | /bin/grep -v '*' | /bin/grep -v master | /bin/grep -v main | /bin/grep -v develop | xargs --no-run-if-empty git branch -d
brcc = ! git br | rg --fixed-strings '[gone]' | awk '{ print $1 }' | xargs --no-run-if-empty git br -D
lg = log --graph --pretty=tformat:'%Cred%h%Creset -%C(cyan)%d %Creset%s %Cgreen(%an %cr)%Creset' --abbrev-commit
lga = log --graph --pretty=tformat:'%Cred%h%Creset -%C(cyan)%d %Creset%s %Cgreen(%an %cr)%Creset' --abbrev-commit --all
di = diff -M
sdi = diff --cached -M
dis = diff --ignore-all-space -M
cat = cat-file -p
unstage = reset HEAD
uncommit = update-ref HEAD HEAD^
uncommithard = reset --hard HEAD^
oups = commit --amend -C HEAD
rebc = rebase --continue
rebt = rebase --abort
rebs = rebase --skip
new = ! git-new "$@"
php-lint = ! cd -- ${GIT_PREFIX:-.} && git status --short | /bin/grep -e '^[AUM ][UM ].*\\.php$' | awk '{print $2}' | xargs --no-run-if-empty -L 1 php -l
php-cs-fixer = ! cd -- ${GIT_PREFIX:-.} && git status --short | /bin/grep -e '^[AUM ][UM ].*\\.php$' | awk '{print $2}' | xargs --no-run-if-empty -L 1 php $(which php-cs-fixer) fix --quiet
eslint = ! cd -- ${GIT_PREFIX:-.} && git status --short | /bin/grep -e '^[AUM ][UM ].*\\.\\(js\\|jsx\\|ts\\|tsx\\)$' | awk '{print $2}' | xargs --no-run-if-empty -L 1 eslint --fix
notes-fetch = fetch origin refs/notes/*:refs/notes/*
notes-push = push origin refs/notes/*
daily = log --no-merges --all --author='Grégoire Pineau' --since='midnight yesterday' --format='%s'
reopen = ! git diff-tree --no-commit-id -r ${1:-HEAD} | cut -d ' ' -f 5-6 | /bin/grep -v "^D" | awk '{print $2}' | xargs --no-run-if-empty code
open = ! git status -s --no-renames | /bin/grep -v "^D" | awk '{print $2}' | xargs --no-run-if-empty code
open-conflict = ! git status -s | /bin/grep ^UU | awk '{print $2}' | xargs --no-run-if-empty code
ignored = ! git ls-files -v | /bin/grep '^[[:lower:]]'
ghost = commit --allow-empty --allow-empty-message -m ""
[color]
ui = true
[core]
autocrlf = input
excludesfile = ~/.gitglobalexclude
pager = less -F -X
[branch]
autosetupmerge = false
rebase = true
[diff]
algorithm = histogram
[commit]
verbose = true
[merge]
summary = true
conflictstyle = zdiff3
[rebase]
updateRefs = true
autosquash = true
autostash = true
[rerere]
enabled = true
[github]
user = lyrixx
[push]
default = tracking
autoSetupRemote = true
[include]
path = ~/.private-gitconfig
[init]
templatedir = ~/.git-template
defaultBranch = main
[status]
showUntrackedFiles = all
[fetch]
prune = true
[tag]
sort = version:refname
[remote "origin"]
# fetch = +refs/pull/*:refs/remotes/origin/pull/*
# [remote "upstream"]
# fetch = +refs/pull/*:refs/remotes/upstream/pull/*
[pull]
rebase = true
[help]
autocorrect = 1