I can't do any "git add" because git doesn't detect any changes in any file that is called__init__.py
I have tried to add new files and it does not detect them either.
I have tried to add code inside the file and it does not detect any changes either.
If I call it __init__2.py
then yes it detects it.
My .gitignore
:
# Distribution / packaging
.Python
*.pyc
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg
.idea/
node_modules/
# Serverless directories
.serverless
venv/bin/activate
venv/bin/activate.csh
venv/bin/activate.fish
venv/bin/activate.ps1
venv/bin/activate_this.py
venv/bin/easy_install
venv/bin/easy_install-2.7
venv/bin/pip
venv/bin/pip2
venv/bin/pip2.7
venv/bin/python
venv/bin/python-config
venv/bin/python2
venv/bin/python2.7
venv/bin/wheel
venv/include/python2.7
I add the project structure:
repositorio
|
carpeta
| __init__.py
| carpeta
| __init__.py
| my_function.py
The file is not inside
.gitignore
and it happens to me with absolutely all the repositories (even if I create new ones)
The file
__init__.py
was in the global file.gitignore
of my $HOME so I was ignoring ALL files of this type.To locate my
.gitignore
global I have runand I have edited the file.
Thanks to @JackNavaRow and @abulafia.