I'm using a very new Python package manager called Poetry.
It creates several files/directories upon creating a new project (environment), but I'm not sure which one I should add to .gitignore
for the best practice.
Say I create a new poetry project by doing this:
$ poetry new foo_project
$ cd foo_project
$ poetry add numpy
$ ls
There are:
tests (directory)
foo_project (also a directory)
pyproject.toml (a file that specifies installed packages)
poetry.lock (a lock file of installed packages)
README.rst (I don't know why README is created but it just shows up.)
I usually add tests/
, foo_project/
, poetry.lock
and README.rst
because they seem to be dependent on the machine the project was created. Also, I seem to be able to reproduce the environment only with pyproject.toml
so that's another reason I ignored all other files/directories.
However, it's just my hunch and unfortunately, I can't find any official guide what I really should add to .gitignore
on the official documentation.
It just bugs me that I don't know for sure what I'm doing. Which ones should I add to my .gitignore
?