You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A thin wrapper around [git-filter-repo](https://github.com/newren/git-filter-repo) for syncing filtered commits from a private repository to a public repository.
4
8
9
+
## Overview
10
+
11
+
git-sync-filtered clones a private repository, filters it to only include specified paths using git-filter-repo, and pushes the result to a public repository's sync branch. This enables maintaining a public subset of a private repository while preserving commit history.
12
+
5
13
## Installation
6
14
7
15
### uv (recommended)
@@ -36,9 +44,9 @@ git-sync-filtered \
36
44
--keep docs
37
45
```
38
46
39
-
Or use a file to specify paths:
47
+
### Using a paths file
40
48
41
-
### paths.txt
49
+
Create a file with paths to keep (one per line, lines starting with `#` are comments):
42
50
43
51
```text
44
52
src
@@ -53,20 +61,22 @@ git-sync-filtered \
53
61
--keep-from-file paths.txt
54
62
```
55
63
56
-
###Options
64
+
## Options
57
65
58
-
-`--private` - Private repo path or URL (required)
59
-
-`--public` - Public repo path or URL (required)
60
-
-`--keep` - Paths to keep (can specify multiple, required)
61
-
-`--keep-from-file` - File containing paths to keep (one per line, lines starting with # are comments)
62
-
-`--sync-branch` - Sync branch name (default: upstream/sync)
63
-
-`--main-branch` - Main branch name (default: main)
64
-
-`--private-branch` - Private branch to sync from (default: main)
65
-
-`--dry-run` - Show what would happen without making changes
0 commit comments