-
Notifications
You must be signed in to change notification settings - Fork 1
/
gitconfig_2022
105 lines (91 loc) · 3.91 KB
/
gitconfig_2022
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
[user]
#name = Pawel Palucki
#email = [email protected]
name = Pawel Palucki
email = [email protected]
[checkout]
defaultRemote=origin
#[core]
#pager = cat
[alias]
# dont add -n to logs l/lg because it disables possibility to asks for logs from master...
l = log --oneline --decorate
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset %C(blue)%an%Creset' --abbrev-commit --date-order
lgd = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%ci)%Creset %C(blue)%an%Creset' --abbrev-commit --date-order
st = status
ci = commit
d = difftool -t vimdiff
dd = difftool -t dirdiff -d --no-prompt
ds = diff --stat
b = !git --no-pager branch -vv
ba = !git --no-pager branch -a -vv
bd = !git --no-pager for-each-ref --sort=committerdate refs/heads/ --format='%(committerdate:short) (%(committerdate:relative)) %(refname:short)'
bda = !git --no-pager for-each-ref --sort=committerdate refs/remotes/ --format='%(committerdate:short) (%(committerdate:relative)) %(refname:short)'
# below similar to above with pager
branches = branch -vv
branchall = branch -a -vv
branchesall = branch -a -vv
branchesdate = for-each-ref --sort=committerdate refs/heads/ --format='%(committerdate:short) (%(committerdate:relative)) %(refname:short)'
branchesdateall = for-each-ref --sort=committerdate refs/remotes/ --format='%(committerdate:short) (%(committerdate:relative)) %(refname:short)'
remotes = remote -v
co = checkout --no-guess
cot = checkout -t
cob = checkout -b
ciam = commit -a -m
ciamwip = commit -a -m WIP
ciav = commit -a --verbose
cim = commit -m
civ = commit --verbose
ca = commit --amend
caa = commit -a --amend
unstash = stash pop
mt = mergetool -t vimdiff
# moved to aliases
# grepall = git rev-list --all | xargs git grep
#
upstream = rev-parse --abbrev-ref --symbolic-full-name @{u}
# or for scripting git for-each-ref --format='%(upstream:short)' $(git symbolic-ref -q HEAD)
# http://stackoverflow.com/questions/89332/how-to-recover-a-dropped-stash-in-git
# recover = log --graph --oneline --decorate $( git fsck --no-reflog | awk '/dangling commit/ {print $3}' )
# For Github (get a pull request
# gpr = '!sh -c "git fetch origin pull/${1}/head:pr/${1}" -'
# with a command like this
# git config --global alias.gpr '!sh -c "git fetch origin pull/${1}/head:pr/${1}" -'
# doesn't not WORK!!!
# without need to fetch refspec before and it won't allow you to update this in future
gpr = !sh -c \"git fetch origin pull/${1}/head:pr/${1}\" -
# unieversal pull request from github
# git gpr intel 356
gpremote = !sh -c \"git fetch ${1} pull/${2}/head:pr/${2}\" -
# tags + commits (-d --derefernce)
#tags = show-ref --abbrev=7 --tag -d
tags = for-each-ref --sort=creatordate --format '%(refname) - %(creatordate)' refs/tags
tagslog = log --no-walk --tags --pretty='%h %d %s' --decorate=full
tagsort = !git for-each-ref --sort=creatordate --format '%(refname) - %(creatordate)' refs/tags | sort -V
[safe]
directory = /root/ppalucki/bcc
directory = /root/ppalucki/bcc/libbpf-tools/blazesym
directory = /root/ppalucki/bcc/src/cc/libbpf
directory = /root/ppalucki/bcc/libbpf-tools/bpftool
directory = /root/ppalucki/bcc
directory = /root/ppalucki/bcc/libbpf-tools/blazesym
directory = /root/ppalucki/bcc/src/cc/libbpf
directory = /root/ppalucki/bcc/libbpf-tools/bpftool
directory = /root/ppalucki/bcc
directory = /root/ppalucki/bcc/libbpf-tools/blazesym
directory = /root/ppalucki/bcc/src/cc/libbpf
directory = /root/ppalucki/bcc/libbpf-tools/bpftool
directory = /home/ppalucki/actions-runner/_work/dotfiles/dotfiles
[difftool "dirdiff"]
cmd = vim -f '+next' '+execute \"DirDiff\" argv(0) argv(1)' $LOCAL $REMOTE
options = --symlinks
[oh-my-zsh]
# optimize globally git_prompt in ZSH prompt
# https://github.com/ohmyzsh/ohmyzsh/discussions/9849
hide-info = 0 # git_prompt_info
hide-status = 0 # git_prompt_status
hide-dirty = 0 # parse_git_dirty
[push]
default=current
[pull]
rebase = false