-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
uv init
fails to create .git directory or .gitignore file when inside git repo
#11655
Comments
Maybe this shouldn't be labelled as a bug? Reading the comments at uv/crates/uv/src/commands/project/init.rs Lines 1221 to 1229 in 6d3614e
I get what |
I feel like this is a valid use-case. I think we could perhaps treat an explicit |
That makes sense to me. In fact, that's what I initially assumed would happen and led to this issue. I haven't finished setting up the repo locally, but I'm happy to work on a patch for this. Would |
Fixes some tests in when parent dir has .git dir Resolves astral-sh#11655
Regarding the default behavior, how about creating |
@Chaoses-Ib I don't understand, what are you proposing? Are you saying |
Summary
When inside of a git repo, running
uv init my-project --vsc=git
does not create a.git
directory or.gitignore
file inmy-project
.For example, my
$HOME
is a git repo containing my dotfiles, and I'm trying to create an uv project at$HOME/dev/my-project
.Output
Example
Platform
Fedora Linux 41 (Sway) - Linux 6.12.4-200.fc41.x86_64 x86_64 GNU/Linux
Version
uv 0.6.2
Python version
Python 3.13.0
The text was updated successfully, but these errors were encountered: