If you are dealing with .env
files, always (!) use a .gitignore
file. This file will tell git to ignore certain files in a project. If your project has a .env
file in the root of the project, you should add the following line to your .gitignore
file.
.env
Most common .gitignore
files for Python project should ignore this file per default, but if you are making your own .gitignore
file, make sure to add this line. This should prevent you from accidentally pushing sensitive information to a repository.