When working with a venv virtual environment, which files should I be commiting to my git repository?

Viewed 6833

Using GitHub's .gitignore, I was able to filter out some files and directories. However, there's a few things that left me a little bit confused:

  • GitHub's .gitignore did not include /bin and /share created by venv. I assumed they should be ignored by git, however, as the user is meant to build the virtual environment themselves.
  • Pip generated a pip-selfcheck.json file, which seemed mostly like clutter. I assume it usually does this, and I just haven't seen the file before because it's been placed with my global pip.
  • pyvenv.cfg is what I really can't make any sense of, though. On one hand, it specifies python version, which ought to be needed for others who want to use the project. On the other hand, it also specifies home = /usr/bin, which, while perhaps probably correct on a lot of Linux distributions, won't necessarily apply to all systems.

Are there any other files/directories I missed? Are there any stricter guidelines for how to structure a project and what to include?

1 Answers
Related