-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.config.yml.example
More file actions
231 lines (212 loc) · 8.22 KB
/
.config.yml.example
File metadata and controls
231 lines (212 loc) · 8.22 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
218
219
220
221
222
223
224
225
226
227
228
229
230
231
# Git Turnouts Configuration
# ===========================
# This file manages configuration for ALL your projects from one central location.
# It lives in the git-turnouts installation directory.
#
# Quick start:
# git-turnouts config init # Creates .config.yml from this template
# git-turnouts config show # View current configuration and detected project
#
# Project names are automatically detected from your repository directory names.
# Example: /Users/you/projects/my-app → project name is "my-app"
#
# AVAILABLE CONFIGURATION PARAMETERS:
# ===================================
#
# Global settings (apply to all projects):
# • base_dir - Base directory for all worktrees
# • open_with - Command/application to open worktrees automatically
# • auto_prune - Automatically prune after removing worktrees (true/false)
# • copy_files - List of files to copy from main worktree to new worktrees
# • protected_branches - Branches that cannot be deleted when removing worktrees
#
# Project-specific settings:
# • name - Project identifier (required, must match repo directory name)
# • base_dir - Project-specific base directory (OVERRIDES global)
# • open_with - Project-specific open command (OVERRIDES global)
# • auto_prune - Project-specific prune setting (OVERRIDES global)
# • copy_files - Project-specific files to copy (ADDS TO global)
# • protected_branches - Project-specific protected branches (ADDS TO global)
#
# CONFIGURATION HIERARCHY:
# =======================
# Scalar settings (base_dir, open_with, auto_prune):
# → Project-specific OVERRIDES global (replacement)
#
# List settings (copy_files, protected_branches):
# → Project-specific ADDS TO global (additive/combined)
#
# Note: All settings are optional except 'name' for project entries.
# All project settings are consolidated under a single project entry.
#
# CONFIGURATION STRUCTURE:
# =======================
# All project settings are consolidated under a single project entry.
# Define everything in one place for cleaner, more maintainable configuration.
# Global Settings
# ===============
# Global settings apply to all projects unless overridden by project-specific settings.
# All global settings are optional and have sensible defaults.
global:
# Base directory for all worktrees
# The project name will automatically be added as a subdirectory
# Result: ~/worktrees/{project-name}/{branch-name}
# Default (if not specified): ../worktree (auto-detected)
# base_dir: ~/worktrees
# Default IDE/application to open when creating worktrees
# Use any command that accepts a directory path as an argument
# Examples: idea, code, subl, vim, emacs, code-insiders, cursor, etc.
# Special handling: iterm (terminal), finder (file browser)
# Default (if not specified): none (worktrees will not open automatically)
# To enable automatic opening, uncomment and set your preferred command:
# open_with: idea
# Automatically run 'git worktree prune' after removing worktrees
# This cleans up stale worktree references
# Options: true, false, yes, no, 1, 0
# Default (if not specified): true
# auto_prune: true
# Files to copy from main worktree to new worktrees
# Useful for environment files, editor configs, etc.
# Default (if not specified): none
# copy_files:
# - .editorconfig
# - .env.example
# - .nvmrc
# - .ruby-version
# - .prettierrc
# - .eslintrc.js
# - .idea/codeStyles/
# Branches that cannot be deleted when removing worktrees
# The worktree will be removed, but the branch will remain
# Note: 'main' and 'master' are ALWAYS protected (even if not listed)
# Default (if not specified): main, master only
# protected_branches:
# - develop
# - staging
# - production
# - release
# Project-Specific Settings
# ==========================
# Project-specific settings combine with or override global settings:
# • Scalar settings (base_dir, open_with, auto_prune): OVERRIDE global
# • List settings (copy_files, protected_branches): ADD TO global
#
# The 'name' must match your repository's directory name exactly.
# Example: If your repo is at ~/code/my-app, use name: my-app
#
# ALL settings for a project are now defined in ONE place!
projects:
# Example 1: Full configuration for a critical project
# - name: critical-app
# base_dir: ~/production/critical
# open_with: idea
# auto_prune: false
# copy_files:
# - .editorconfig
# - .env.production
# - .nvmrc
# protected_branches:
# - develop
# - staging
# - production
# Example 2: Backend project with specific IDE
# - name: backend-services
# open_with: idea
# copy_files:
# - .editorconfig
# - .env.example
# Example 3: Frontend project with VS Code
# - name: frontend-app
# open_with: code
# base_dir: ~/dev/frontend
# copy_files:
# - .prettierrc
# - .eslintrc.js
# Example 4: Experimental project with minimal protection
# - name: experimental
# auto_prune: true
# # Only main/master protected for this project
# Example 5: Project using only global settings
# - name: standard-project
# # No overrides, uses all global settings
# Configuration Examples
# ======================
# Example 1: Minimal global configuration (VS Code user)
# -------------------------------------------------------
# global:
# open_with: code
# Example 2: Global worktree location with file copying
# ------------------------------------------------------
# global:
# base_dir: ~/dev/worktrees
# copy_files:
# - .env.example
# - .editorconfig
# Example 3: Mixed global and project-specific settings (shows additive behavior)
# -------------------------------------------------------------------------------
# global:
# base_dir: ~/worktrees
# open_with: code
# copy_files:
# - .editorconfig # Global: all projects get this
# - .env.example
# protected_branches:
# - develop # Global: all projects protect this
# auto_prune: true
#
# projects:
# - name: critical-app
# base_dir: ~/production/critical # OVERRIDES global base_dir
# open_with: idea # OVERRIDES global open_with
# auto_prune: false # OVERRIDES global auto_prune
# copy_files: # ADDS TO global copy_files
# - .env.production # Result: .editorconfig, .env.example, .env.production
# protected_branches: # ADDS TO global protected_branches
# - staging # Result: main, master, develop, staging, production
# - production
# - name: backend-services
# open_with: idea # OVERRIDES global open_with
# # copy_files: inherits global (.editorconfig, .env.example)
# # protected_branches: inherits global (main, master, develop)
# - name: frontend-app
# open_with: code # Same as global, explicit override
# copy_files: # ADDS TO global copy_files
# - .prettierrc # Result: .editorconfig, .env.example, .prettierrc, .eslintrc.js
# - .eslintrc.js
# Example 4: All global settings (no project overrides)
# -----------------------------------------------------
# global:
# base_dir: ~/worktrees
# open_with: code
# auto_prune: true
# copy_files:
# - .env.example
# - .nvmrc
# protected_branches:
# - develop
# - staging
# Example 5: Multiple projects with different needs
# -------------------------------------------------
# global:
# open_with: idea
# base_dir: ~/worktrees
#
# projects:
# - name: project-a
# copy_files:
# - .env.local
# - .editorconfig
# - name: project-b
# open_with: code
# protected_branches:
# - develop
# - name: project-c
# base_dir: ~/custom/project-c
# auto_prune: false
# HARDCODED DEFAULTS (when not specified):
# ========================================
# global.base_dir: ../worktree (auto-detected from repo location)
# global.open_with: (none - worktrees will not open automatically)
# global.auto_prune: true
# global.copy_files: [] (no files copied)
# global.protected_branches: [main, master] (always protected)