Skip to content

uv init Add a .gitignore file? #12395

Description

@jordan-carson

Question

What is the community's thoughts on adding a basic .gitignore file during uv init? My rationale is given uv init creates a .venv folder, which should never be pushed to a git, it would be helpful to add an ignore file to include the .venv.

Simple ignore file such as

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# Environments
.env
.venv

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg


# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# IDE specific files
.idea/
.vscode/
*.swp
*.swo

Platform

No response

Version

0.5.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or improvement to existing functionalityneeds-decisionUndecided if this should be done

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions