-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathconfig.include
165 lines (140 loc) · 7.77 KB
/
config.include
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
[core]
# Enable file system cache on Windows (no effect on OS X/Linux)
# c.f. https://groups.google.com/forum/#!topic/git-for-windows/9WrSosaa4A8
fscache = true
# Enable long path support for Windows (no effect on OS X/Linux)
# Git uses the proper API to create long paths on Windows. However, many
# Windows applications use an outdated API that only support paths up to a
# length of 260 characters. As a result these applications would not be able to
# work with the longer paths properly. Keep that in mind if you run into path
# trouble!
# c.f. https://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx
longpaths = true
[color]
diff = auto
status = auto
branch = auto
ui = true
[submodule]
fetchJobs = 0
[rebase]
autoStash = true
[push]
default = simple
###############################################################################
# Configure Git LFS
# c.f. https://git-lfs.github.com/
###############################################################################
[lfs]
batch = true
ConcurrentTransfers = 10
# If the Git LFS locking feature is used, then Git LFS will set lockable files
# to "readonly" by default. This is implemented with a Git LFS "post-checkout"
# hook. Git LFS can skip this hook if no file is locked. However, Git LFS needs
# to traverse the entire tree to find all ".gitattributes" and check for locked
# files. In a large tree (e.g. >20k directories, >300k files) this can take a
# while. Instruct Git LFS to not set lockable files to "readonly". This skips
# the "post-checkout" entirely and speeds up Git LFS for large repositories.
SetLockableReadonly = false
[lfs "transfer"]
maxretries = 10
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[lfs "https://git.company.com/"]
locksverify = true
###############################################################################
# Use HTTPS protocol instead of Git protocol
###############################################################################
[url "https://git.company.com/"]
insteadOf = "git://git.company.com/"
pushInsteadOf = "git://git.company.com/"
###############################################################################
# Configure push protection to public Git hosting services
###############################################################################
[url "/// ATTENTION /// Are you sure you want to push to public github.com? To override this warning run: 'git adsk enable-public-push github.com"]
pushInsteadOf = "https://github.com"
[url "/// ATTENTION /// Are you sure you want to push to public github.com? To override this warning run: 'git adsk enable-public-push github.com"]
pushInsteadOf = "[email protected]"
[url "/// ATTENTION /// Are you sure you want to push to public bitbucket.org? To override this warning run: 'git adsk enable-public-push bitbucket.org"]
pushInsteadOf = "https://bitbucket.org"
[url "/// ATTENTION /// Are you sure you want to push to public bitbucket.org? To override this warning run: 'git adsk enable-public-push bitbucket.org"]
pushInsteadOf = "[email protected]"
[url "/// ATTENTION /// Are you sure you want to push to public gitlab.com? To override this warning run: 'git adsk enable-public-push gitlab.com"]
pushInsteadOf = "https://gitlab.com"
[url "/// ATTENTION /// Are you sure you want to push to public gitlab.com? To override this warning run: 'git adsk enable-public-push gitlab.com"]
pushInsteadOf = "[email protected]"
[alias]
st=status
br=branch
lol = "log --pretty=oneline --abbrev-commit --graph --decorate"
lola = "log --pretty=oneline --abbrev-commit --graph --decorate --all"
prlog = "log --pretty=oneline --abbrev-commit --graph --decorate --first-parent"
###############################################################################
# Enterprise Config setup command
###############################################################################
#
# Jenkins Git Plugin 3.4.1 cannot handle mutplie lines in config files.
# Therefore, we have to reformat the code below into the one line.
#
# adsk = "!f() { \
# KIT_PATH=$(dirname \"$(git config include.path)\") && \
# ENV=$(git config adsk.environment || true) && \
# COMMAND=$1 && \
# if [ -n \"$COMMAND\" ]; then \
# shift 1; \
# fi && \
# if [ \"$KIT_PATH\" = \"adsk-git\" ]; then \
# case $(uname -s) in \
# MINGW32_NT*) KIT_PATH=/mingw32/etc/adsk-git;; \
# MINGW64_NT*) KIT_PATH=/mingw64/etc/adsk-git;; \
# esac \
# fi && \
# if [ -z \"$COMMAND\" ] || [ \"$COMMAND\" = \"setup\" ]; then \
# TMP_SETUP=$(mktemp -t git-enterprise-kit.XXXXXX) && \
# cp \"$KIT_PATH/setup.sh\" \"$TMP_SETUP\" && \
# bash \"$TMP_SETUP\" \"$KIT_PATH\" \"$@\" && \
# rm \"$TMP_SETUP\"; \
# elif [ \"$COMMAND\" = \"install\" ]; then \
# echo \"Enterprise config already installed!\"; \
# elif [ -n \"$ENV\" ] && [ -e "$KIT_PATH/envs/$ENV/$COMMAND.sh" ]; then \
# bash \"$KIT_PATH/envs/$ENV/$COMMAND.sh\" \"$@\"; \
# elif [ -e \"$KIT_PATH/$COMMAND.sh\" ]; then \
# bash \"$KIT_PATH/$COMMAND.sh\" \"$@\"; \
# else \
# echo \"Enterprise Config command '$COMMAND' not found. Please contact [email protected] or the #tech-git Slack channel.\"; \
# fi \
# }; f"
adsk = "!f() { KIT_PATH=$(dirname \"$(git config include.path)\") && ENV=$(git config adsk.environment || true) && COMMAND=$1 && if [ -n \"$COMMAND\" ]; then shift 1; fi && if [ \"$KIT_PATH\" = \"adsk-git\" ]; then case $(uname -s) in MINGW32_NT*) KIT_PATH=/mingw32/etc/adsk-git;; MINGW64_NT*) KIT_PATH=/mingw64/etc/adsk-git;; esac fi && if [ -z \"$COMMAND\" ] || [ \"$COMMAND\" = \"setup\" ]; then TMP_SETUP=$(mktemp -t git-enterprise-kit.XXXXXX) && cp \"$KIT_PATH/setup.sh\" \"$TMP_SETUP\" && bash \"$TMP_SETUP\" \"$KIT_PATH\" \"$@\" && rm \"$TMP_SETUP\"; elif [ \"$COMMAND\" = \"install\" ]; then echo \"Enterprise config already installed!\"; elif [ -n \"$ENV\" ] && [ -e "$KIT_PATH/envs/$ENV/$COMMAND.sh" ]; then bash \"$KIT_PATH/envs/$ENV/$COMMAND.sh\" \"$@\"; elif [ -e \"$KIT_PATH/$COMMAND.sh\" ]; then bash \"$KIT_PATH/$COMMAND.sh\" \"$@\"; else echo \"Enterprise Config command '$COMMAND' not found. Please contact [email protected] or the #tech-git Slack channel.\"; fi }; f"
###############################################################################
# hub command-line wrapper https://hub.github.com/
###############################################################################
[hub]
host = git.company.com
protocol = https
###############################################################################
# GitHub for Windows
###############################################################################
[ghfw]
disableverification = true
###############################################################################
# More helpful diff'ing of one line JSON files
###############################################################################
[diff "json"]
textconv = "perl -MJSON::PP -e '$j = JSON::PP->new->pretty->canonical; print $j->encode($j->decode(do {$/ = undef; <>}))'"
cachetextconv = true
###############################################################################
# Define a merge driver that won't actually merge a file... for those files
# which must never be merged.
#
# Example content of .gitattributes file:
# branchinfo.txt merge=ours
# /environment-config/* merge=ours
#
# Further information:
# https://medium.com/@porteneuve/how-to-make-git-preserve-specific-files-while-merging-18c92343826b
###############################################################################
[merge "ours"]
driver = true