I did not include them in the .gitignore but they got untracked. Actually I added a pychache to the gitignore and was hoping that would also clean up the remote (it did). Then out of curiosity I wanted to see what was in the index and what fiels were being tracked so I ran some commands I saw on SO.
Specifically ones like: git ls-tree --full-tree --name-only -r HEAD
Then I did a git status and noticed a lot of my files that I was not ignoring (including the .gitignore ironically) were now considered untracked. I'm not sure what I did to make this happen.
Note that I'm in a virtual environment. I don't think that would affect anything.
Note that these were not actually deleted from my local workspace so nothing was lost, but they stopped getting tracked and consequently were deleted from remote and were not being committed.
To recommit them I had to add them back specifically by name, so not with git add .
but with git add ../License
Why is this?
To recommit them I had to add them back specifically by name, so not with git add . but with git add ../License
You are not in the root directory of your repository. git add .
means "add everything from the current directory (.
), recursively". It does not propagate to parent directory.
If you run git add .
from the root directory of the repository, it does what you expect. You could also do git add -A
from any directory within the repository.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments