Skip to content

(馃巵) A git/.gitignore exclude option聽#12505

Closed

Description

@KotlinIsland

Black and isort have this cool option where you can use .gitignore to select what to ignore, I think that could be useful.

Activity

  1. davidemerritt commented on Feb 9, 2023

    @davidemerritt

    +1 - keeping these in sync is unnecessary friction!

  2. MicaelJarniac commented on Apr 26, 2023

    @MicaelJarniac
  3. IDrumsey commented on Apr 28, 2023

    @IDrumsey

    +1

  4. KotlinIsland commented on Apr 29, 2023

    @KotlinIsland
    ContributorAuthor

    @IDrumsey
    Please don't comment with "+1", the "馃憤" reaction serves the same purpose. Commenting it will notify everyone on the thread, without adding any meaningful discussion.

  5. asarkar commented on Jan 10, 2025

    @asarkar

    #18429 was closed as a dup, so, commenting here. While ignoring stuff in .gitignore would be helpful (and was suggested in #18429), IMO, the real problem is the absence of a common-sense default exclusion list. If implementing .gitignore exclusion is hard, could a hard coded exclusion list be implemented sooner? Other tools such as pytest or ruff already have such lists, without which the user is forced to perpetuate configuration like the following:

    [tool.mypy]
    exclude = [
        "venv",
        "build",
    ]
    

    https://docs.astral.sh/ruff/settings/#exclude

    Default value: [".bzr", ".direnv", ".eggs", ".git", ".git-rewrite", ".hg", ".mypy_cache", ".nox", ".pants.d", ".pytype", ".ruff_cache", ".svn", ".tox", ".venv", "__pypackages__", "_build", "buck-out", "dist", "node_modules", "venv"]
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions