-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgitconfig
More file actions
135 lines (118 loc) · 4.67 KB
/
gitconfig
File metadata and controls
135 lines (118 loc) · 4.67 KB
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
[user]
name = SpaceOne
email = space@wechall.net
[alias]
fixup=commit --fixup
a = commit --amend
aa = commit --amend -a
ci = commit
ca = commit -a
ciclg = !gitci
aliases = "!git config -l | grep alias | cut -c 7-"
branches = !branches
sl = stash list
sp = stash pop
ed = branch --edit-description
f = commit --ammend
tf = "!f() { \
FILE=\"$1\"; \
if [ -z \"$FILE\" ]; then echo 'Usage: git tipfix <file>'; exit 1; fi; \
COMMIT=$(git log -n 1 --pretty=format:%H -- \"$FILE\"); \
git commit --fixup=\"$COMMIT\" \"$@\"; \
}; f" # tip fixup
st = status -s --untracked-files=all
std = status -s --untracked-files=normal
stn = status -s --untracked-files=no
# branches
b = branch
co = checkout
cob = checkout -b
pr = pull --rebase
bl = "!f(){ ~/git/depot_tools/git_hyper_blame.py --ignore-file ~/.ignore_blame_commits \"$@\";};f"
diffstat = diff --stat -r
# diff
d = diff --color-words
dc = diff --color-words --cached
df = diff-index --color-words -p HEAD
diffc = diff --cached
#difff = diff-index -p HEAD
difff = diff --staged
cdiff = diff --color-words=.
wdiff = diff --word-diff=color
clog = log -p --color-words=.
wlog = log -p --word-diff=color
# history of a file
filelog = log -u
# show history
ls = log --pretty=format:"%C(auto)%h\\ %Cgreen%>(12)%ar%C(auto)%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --graph
ll = log --pretty=format:"%C(auto)%h\\ %Cgreen%>(12)%ar%C(auto)%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --stat
# show latest tag
lasttag = describe --tags --abbrev=0
# show latest commit
tip = log HEAD -1 --stat --
# show who contributed to the project
who = shortlog -n -s --no-merges
type = cat-file -t
dump = cat-file -p
pick = cherry-pick
cp = cherry-pick
merge = merge --ff-only
# some git svn commands
up = svn rebase
sci = svn dcommit
unisvn = !gcu
ffmerge = "!ffmerge () { if [ \"$(git merge-base HEAD \"$1\")\" = \"$(git rev-parse HEAD)\" ]; then git merge --no-ff \"$1\"; else echo >&2 \"Not up to date; refusing to merge\"; return 1; fi; }; ffmerge"
rbs = "!rbs () { git show $(< .git/rebase-apply/original-commit); }; rbs"
dch= "!dch() { /usr/bin/dch -D unstable -i --no-auto-nmu $(git log HEAD -1 --format='format:%s'); }; dch"
fbest = "!fbest() { git branch | grep fbest; }; fbest"
rba = rebase --abort
rbc = rebase --continue
rb = rebase --autosquash -i
cpc = cherry-pick --continue
cl = "!f() { git log --format=format:\"[$(git describe --contains --all HEAD)] %C(auto)%h %s\" --stat=${COLUMNS:-100},,10 \"${@:--1}\";};f"
c = "!c() { git commit -e -m \"$(dpkg-parsechangelog -l ${GIT_PREFIX:-.}/debian/changelog -S Changes | tail -n +4 | sed 's/^\\s*\\*\\s*//g')\" \"$@\";};c"
mwp = "!f() { git push -o merge_request.create -o merge_request.description=\"See bugzilla\" -o merge_request.target=\"$(git rev-parse --abbrev-ref \"@{u}\"|cut -d/ -f2-)\" -o merge_request.remove_source_branch \"$@\";};f"
mwps = "!f() { git push -o merge_request.create -o merge_request.target=\"$(git rev-parse --abbrev-ref \"@{u}\"|cut -d/ -f2-)\" -o merge_request.remove_source_branch -o merge_request.merge_when_pipeline_succeeds \"$@\";};f"
yaml = "!f() { git ci -m \"$(printf \"chore(advisory): YAML\n\nBug #$1\")\" $2; };f"
cup= "!f() { git range-diff \"$(git rev-parse --abbrev-ref --symbolic-full-name @{u})\"...@; };f"
cupp= "!f() { git diff \"$(git rev-parse --abbrev-ref --symbolic-full-name @{u})\"..@ \"$@\"; };f"
dp= "!f() { git diff \"$@\" --name-only | sed 's#^\\([^/]*/[^/]*\\)/.*#\\1#g' | sort -u | while read line; do [ -d \"$line/debian/\" ] && echo -n \"$line \"; done; };f"
clg = "!f() { git rebase --exec \"$(bash -c 'command -v git-commit-filter-auto-dch')\" \"$@\"; };f"
apt = "!f() { deb -b \"$(git rev-parse --abbrev-ref HEAD)\"; };f"
fat=commit -a --fixup=@
[push]
default = upstream
[color]
diff = auto
ui = auto
[core]
pager = less -FSRX
# pager = delta
editor = /usr/bin/vim
attributesfile = ~/.gitattributes
[merge "pofile"]
name = custom merge driver for gettext po files
driver = git-po-merge %A %O %B
[merge "merge-changelog"]
name = GNU-style ChangeLog merge driver
driver = /usr/bin/git-merge-changelog %O %A %B
[merge "dpkg-mergechangelogs"]
name = debian/changelog merge driver
driver = dpkg-mergechangelogs -m %O %A %B %A
[merge "merge-debian-changelog"]
name = debian/changelog merge driver
driver = ~/git/toolshed/VCS/merge-debian-changelog -vvv --preserve %A %B %A
[diff "jpg"]
textconv = exif
cachetextconv = true
[diff "po"]
#textconv=msgcat --no-location --no-wrap --sort-output
textconv=bash -c 'msgcat --no-location --no-wrap --sort-output "$1" 2>/dev/null || cat "$1"' --
[diff]
noprefix = true
wsErrorHighlight = all
statGraphWidth = 999
#[branch]
# autosetupmerge = always
[init]
defaultBranch = main