-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add --global
option to --install
to save filter config to global .gitconfig
#98
Comments
FYI: For the inevitable bug reports that will come from VS Code users, please note the following. After adding the filters to my global References: VS Code VCS and Git: Support WSL #9502 This solution fixed my problem using the insiders build of VS Code. This is also helpful. |
The system wide git config seems to reside in So, if we add a |
I wouldn't want to mess with the system wide config since those files are controlled by your system package manager and whenever those would be changed e.g. when the On top of that you'd need to run |
Setting this flag writes the filter config to ~/.gitconfig
Also add an overview table of the different configuration options and document them in the 'Manual filter installation' section.
I've added a |
Thanks a bunch @kynan . I tested on one of my projects and it worked as I had hoped it would. The table in the documentation is especially helpful. One side effect to note however: Here's the filter that was clobbered by uninstalling/re-installing: [filter "nbstripout"]
clean = \"/mnt/c/users/jravi/miniconda3/bin/python3.7\" \"/mnt/c/users/jravi/miniconda3/lib/python3.7/site-packages/nbstripout\"
smudge = cat
required = true
extrakeys = \n metadata.celltoolbar metadata.kernel_spec.display_name\n metadata.kernel_spec.name metadata.language_info.codemirror_mode.version\n metadata.language_info.pygments_lexer metadata.language_info.version\n metadata.toc metadata.notify_time metadata.varInspector\n cell.metadata.heading_collapsed cell.metadata.hidden\n cell.metadata.code_folding cell.metadata.tags cell.metadata.init_cell The Thanks for implementing the feature request, it will be very helpful! |
Tracked this in #102, thanks for flagging. |
Setting this flag writes the filter config to ~/.gitconfig
Also add an overview table of the different configuration options and document them in the 'Manual filter installation' section.
Presently,
nbstripout --install
modifies the repo.git/config
. This is less portable than saving the path tonbstripout
and the filters in the user's global.gitconfig
.It would be nice to have a command such as:
nbstripout --install --global --atributes .gitattributes
that created a.gitattributes
file in the current repo but saved the filters and path globally. Then, every repo with the.gitattributes
file would be stripped without needing to install nbstripout in every cloned repository.See conversation #7
The text was updated successfully, but these errors were encountered: