Skip to content

Add a flag to ignore common usage patterns? #382

@al-the-x

Description

@al-the-x

It's pretty common for me to drop a .gitignore file into a directory that I want to exist within the project but whose contents should always be ignored, e.g. the dist/ folder or other compilation destination. The patterns I use for that file are always:

*
.*
!.gitignore

Would it be worthwhile to have a flag for git ignore that would drop in one of these common usage patterns, at least as a starting point? For example:

$> cd dist
/path/to/my/project/dist/
$> git ignore --all
Adding patterns to: .gitignore
... adding *
... adding .*
... adding !.gitignore
$> cd ..
/path/to/my/project/
$> git status -s
??  dist/.gitignore

Happy to submit a PR and contribute, as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions