Closed RoelantStegmann closed 5 years ago
I'm not a Windows user, so can't help unfortunately. Hopefully someone from the community knows the answer, maybe @ibressler ?
The command given to --tree-filter is interpreted by bash. Therefore, it works like this: (Tested in Anaconda Prompt on Win10 which is a Windows command prompt with nbstripout/Python available but not having GIT in its %PATH%)
"c:\Program Files\Git\bin\git.exe" filter-branch -f --tree-filter "(IFS=$'\n'; for fn in $(find . -type f -name '*.ipynb'); do nbstripout \"$fn\" --keep-count --keep-output; done)"
The most outside parentheses (aka subshell) are required to encapsulate the IFS setting for supporting file names with spaces. Changing the IFS breaks the GIT filter-branch command otherwise.
Thanks @ibressler! @RoelantStegmann Does this answer your question?
@RoelantStegmann Friendly ping, can this be closed?
Assuming this has been answered. @RoelantStegmann please reopen if not.
Was wondering if anyone knows the correct windows syntax by heart: i keep getting errors :) Maybe we can add it to the readme afterwards?