summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-06-24 01:30:19 +0300
committerPaul Buetow <paul@buetow.org>2025-06-24 01:30:19 +0300
commit702528d8e16b702bccc70df3ddfee687391e2955 (patch)
treea2d8cb15aada5646e91a3cc99624786be5bc9332 /README.md
parentbfc52a37f0650e0d8cf727f5998882a3bcebbe0c (diff)
feat: add branch exclusion feature with regex patterns
Users can now exclude branches from synchronization using regex patterns in the configuration file. This is useful for: - Excluding temporary or experimental branches - Skipping vendor or third-party branches - Ignoring deployment-specific branches Configuration example: ```json { "exclude_branches": [ "^codex/", // Exclude branches starting with "codex/" "^temp-", // Exclude branches starting with "temp-" "-wip$" // Exclude branches ending with "-wip" ] } ``` Features: - Regex pattern matching for flexible exclusion rules - Clear reporting of excluded branches during sync - Excluded branches are filtered from sync but still analyzed for abandonment - Invalid regex patterns are reported but don't stop sync The feature helps maintain cleaner synchronization by allowing users to ignore branches that shouldn't be synchronized across all repositories. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'README.md')
-rw-r--r--README.md19
1 files changed, 19 insertions, 0 deletions
diff --git a/README.md b/README.md
index 640ccab..2cb27e9 100644
--- a/README.md
+++ b/README.md
@@ -111,6 +111,25 @@ Create a `gitsyncer.json` file:
- Merges changes from remotes that have the branch
- Pushes to all remotes (creating branches if needed)
+## Branch Exclusion
+
+You can exclude branches from synchronization using regex patterns in your configuration:
+
+```json
+{
+ "organizations": [...],
+ "repositories": [...],
+ "exclude_branches": [
+ "^codex/", // Exclude branches starting with "codex/"
+ "^temp-", // Exclude branches starting with "temp-"
+ "-wip$", // Exclude branches ending with "-wip"
+ "experimental" // Exclude branches containing "experimental"
+ ]
+}
+```
+
+Excluded branches will be reported during sync but not synchronized.
+
## Example Workflows
### Sync specific repositories