Search code examples
gitgithubrepositorypushcommit

Git - nothing to commit , working tree clean even after modifying file


I'm trying to push the file RecordLinkage.ipynb to my remote repository but anytime I create it or modify it git doesn't react to it at all. Using git status and git commit -m "Commit message" I get "On branch main, nothing to commit , working tree clean"

Whenever I modify the file I follow this procedure:

  1. git add . or git add --all (Tried both)
  2. check git status -> nothing to commit
  3. I try committing anyways -> nothing to commit (as expected)

The upstream is set correctly, main is the branch I want to be on. The file RecordLinkage.ipynb isn't on there (not even on the other branch).

What's weird is that any other file is tracked by git. It seems that only new .ipynb files are ignored. This is my .gitignore file:

src/*
src/datasets_zip/*
!src/datasets_zip
!src/datasets_zip/*.zip

!final_dataset.csv

*.txt
*.pdf

This is my remote repository:

enter image description here

And this is my local repository:

enter image description here

I also reinitialised the local repository with the usual procedure.


Solution

  • I asked one of my partners to push another notebook, I pulled it and everything went smooth after that