Skip to content

Fix parent metadata leakage in nbdev-new - #1650

Open
maxct wants to merge 1 commit into
AnswerDotAI:mainfrom
maxct:fix-nbdev-new-parent-repo-leak
Open

maxct wants to merge 1 commit into
AnswerDotAI:mainfrom
maxct:fix-nbdev-new-parent-repo-leak

Conversation

@maxct

@maxct maxct commented Sep 21, 2026

Copy link
Copy Markdown

Prevent nbdev-new from copying repository metadata from a parent Git repository.
I encountered this because my fastws workspace is versioned with Git. Creating an nbdev project inside that workspace caused nbdev-new to use the workspace repository’s name, owner, branch, description, and other metadata for the new project.

nbdev_create_config now uses Git repository metadata only when the configuration target is the root of that repository. Otherwise, it uses the explicit arguments, user configuration, and target directory name as before.

A workaround is to run git init in the new project directory before running nbdev-new. This creates a separate Git root, but project creation should work correctly without that extra step.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant