Skip to content

Incomplete .gitignore missing common Python entries #15

@anxkhn

Description

@anxkhn

Context

The .gitignore file only lists venv/, .vscode/, and .idea/. It is missing many common Python entries like __pycache__/, *.pyc, .env, *.egg-info/, dist/, build/, and .pytest_cache/. This means generated files could accidentally be committed to the repository.

Steps to reproduce

  1. Open .gitignore.
  2. Notice it only contains:
    venv/
    .vscode/
    .idea/
    
  3. Run the tests: pytest tests/ -- this creates __pycache__/ and .pytest_cache/ directories.
  4. Run git status -- these generated directories show up as untracked files.

Expected behavior

The .gitignore should include standard Python ignores so that generated files do not appear in git status.

Actual behavior

Only 3 entries are present. Common Python artifacts are not ignored.

Files

  • .gitignore

Acceptance criteria

  • .gitignore includes at least: __pycache__/, *.pyc, .env, .pytest_cache/, *.egg-info/
  • Running pytest and then git status does not show generated files
  • The existing entries (venv/, .vscode/, .idea/) are preserved

Suggested approach

  1. Open .gitignore.
  2. Add the missing entries. A good minimal Python .gitignore includes:
    __pycache__/
    *.pyc
    *.pyo
    .env
    .pytest_cache/
    *.egg-info/
    dist/
    build/
    
  3. Run git status to verify the generated directories are now ignored.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions