Skip to content

.gitignore added to places it should not #1862

Description

@stefanholek

Refs #1806

Virtualenv now drops a .gitignore file. While I understand where you are coming from, it is a mistake to assume virtualenv owns the target directory. For example, I and many people I work with typically do this:

git clone git@github.com:stefanholek/foo
cd foo
virtualenv .
./bin/pip install -e .
./bin/python -m unittest

Recent versions of virtualenv add a .gitignore file into my sandbox. To make matters worse it even overwrites an existing .gitignore file! This is very clearly wrong.

I suggest to not write the .gitignore file unless virtualenv has created the target directory, or at least don't write it if the target directory already contains a .git directory and/or a .gitignore file.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions