-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy path.gitconfig
More file actions
217 lines (185 loc) · 6.99 KB
/
.gitconfig
File metadata and controls
217 lines (185 loc) · 6.99 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
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
# =============================================================================
# Git Configuration (Repository-Level)
# =============================================================================
#
# Repository-specific Git settings.
# Documentation: https://git-scm.com/docs/git-config
#
# This file is portable - copy to other repos without modification.
#
# -----------------------------------------------------------------------------
# Configuration Hierarchy
# -----------------------------------------------------------------------------
#
# Git reads config from multiple locations (highest to lowest priority):
#
# 1. Command line: git -c user.name="..."
# 2. Repository: .git/config (local)
# 3. User: ~/.gitconfig or ~/.config/git/config (global)
# 4. System: /etc/gitconfig (system)
#
# This file (.gitconfig) is for SHARED repository settings that should
# apply to all contributors. It's included via:
#
# git config --local include.path ../.gitconfig
#
# Or automatically if Git is configured to use it.
#
# -----------------------------------------------------------------------------
# Usage
# -----------------------------------------------------------------------------
#
# To apply these settings to your local clone:
#
# git config --local include.path ../.gitconfig
#
# To view effective configuration:
#
# git config --list --show-origin
#
# =============================================================================
# =============================================================================
# [init] - Repository Initialization
# =============================================================================
[init]
# ---------------------------------------------------------------------------
# defaultBranch
# ---------------------------------------------------------------------------
# Default branch name for new repositories.
# "dev" is used as the main development branch in this project.
#
# Alternatives: main, master, trunk
#
defaultBranch = dev
# =============================================================================
# [core] - Core Git Behavior
# =============================================================================
[core]
# ---------------------------------------------------------------------------
# autocrlf
# ---------------------------------------------------------------------------
# Line ending handling for cross-platform compatibility.
#
# input: Convert CRLF to LF on commit, no conversion on checkout
# Best for Unix/macOS or repos shared across platforms
#
# true: Convert CRLF to LF on commit, LF to CRLF on checkout
# Best for Windows-only development
#
# false: No conversion (use with .gitattributes for precise control)
#
autocrlf = input
# ---------------------------------------------------------------------------
# safecrlf
# ---------------------------------------------------------------------------
# Verify line ending conversion is reversible.
#
# true: Reject commits that would cause irreversible conversion
# warn: Print warning but allow commit
# false: No checking
#
safecrlf = true
# =============================================================================
# [pull] - Pull Behavior
# =============================================================================
[pull]
# ---------------------------------------------------------------------------
# rebase
# ---------------------------------------------------------------------------
# Use rebase instead of merge when pulling.
#
# true: Always rebase (git pull --rebase)
# false: Always merge (default Git behavior)
# interactive: Interactive rebase (git pull --rebase=interactive)
# merges: Rebase but preserve merge commits
#
# Rebasing creates a cleaner, linear history without merge commits.
#
rebase = true
# =============================================================================
# [push] - Push Behavior
# =============================================================================
[push]
# ---------------------------------------------------------------------------
# autoSetupRemote
# ---------------------------------------------------------------------------
# Automatically set up tracking for new branches on push.
#
# Without this, first push requires:
# git push --set-upstream origin branch-name
#
# With this enabled:
# git push # Just works
#
autoSetupRemote = true
# ---------------------------------------------------------------------------
# default
# ---------------------------------------------------------------------------
# Default push behavior when no refspec is given.
#
# current: Push current branch to same-named remote branch
# upstream: Push to configured upstream branch
# simple: Like upstream, but refuse if names differ (safest)
# matching: Push all matching branches (old default, not recommended)
#
default = current
# =============================================================================
# [fetch] - Fetch Behavior
# =============================================================================
[fetch]
# ---------------------------------------------------------------------------
# prune
# ---------------------------------------------------------------------------
# Remove remote-tracking branches that no longer exist on the remote.
# Equivalent to: git fetch --prune
#
# prune = true
# =============================================================================
# [merge] - Merge Behavior
# =============================================================================
[merge]
# ---------------------------------------------------------------------------
# ff
# ---------------------------------------------------------------------------
# Fast-forward behavior for merges.
#
# true: Fast-forward when possible (default)
# false: Never fast-forward, always create merge commit
# only: Only allow fast-forward merges
#
# ff = true
# =============================================================================
# [diff] - Diff Output
# =============================================================================
[diff]
# ---------------------------------------------------------------------------
# colorMoved
# ---------------------------------------------------------------------------
# Highlight moved lines in diffs.
#
# default: Color moved blocks
# plain: Color moved lines
# blocks: Color moved blocks (ignore whitespace changes)
# zebra: Alternating colors for moved blocks
#
# colorMoved = zebra
# =============================================================================
# [alias] - Git Aliases
# =============================================================================
#
# Shorthand commands. Examples:
#
# git st → git status
# git co → git checkout
# git br → git branch
# git ci → git commit
# git lg → Pretty log graph
#
# Note: Personal aliases should go in ~/.gitconfig, not here.
#
# [alias]
# st = status
# co = checkout
# br = branch
# ci = commit
# lg = log --oneline --graph --decorate