Moving files not in subdir when subdirectory-filter #437
Replies: 1 comment
-
You forgot a
If you only want the path rename aspects without the path filtering aspects, then use just that part, i.e. $ git filter-repo --path-rename subdir1/:'' --path-rename foo:misc/foo
After making both the above changes, to your example, I do end up with a branch that has those two filenames present. |
Beta Was this translation helpful? Give feedback.
-
I want to do a --subdirectory-filter on a subdir of the repo root, and keep or move files that are in the repo root that correspond to commits made in the subdir being filtered on. I've tried several variations of --path-rename and --path-rename-match but nothing seems to work.
For example:
git checkout -b foobranch
touch foo
touch subdir1/bar
git commit
Then filter
git filter-repo --subdirectory-filter subdir1 --path-rename foo:misc/foo
Should result in the foobranch:
bar
misc/foo
Beta Was this translation helpful? Give feedback.
All reactions