-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgitconfig
More file actions
119 lines (105 loc) · 3.76 KB
/
gitconfig
File metadata and controls
119 lines (105 loc) · 3.76 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
[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
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.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"
[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" || cat "$1"' --
[diff]
noprefix = true
wsErrorHighlight = all
statGraphWidth = 999
#[branch]
# autosetupmerge = always
[init]
defaultBranch = main