Reputation: 41
I've just updated my local working directory with the up-to-date images and DB, but as soon as i did this the git status showed me these jpg files as "deleted" as if they were tracked, but they were not, as my .gitignore file contained the images folder to be ignored (**/uploads/) and it never complained when i added new image files, i'm assuming they were tracked and committed previously by mistake, and when i copied it overwrote these files.
Now i'm trying to get rid of these files messing my "git status" but i can't.
I've tried
git rm -r --cached uploads/
but it just moved it from red to green (assuming it moved them to staging).
I've tried
git update-index --assume-unchanged uploads/
but it does nothing and it's still in the staging.
I've tried removing them from staging and re-issuing the git update-index --assume-unchanged uploads/
command but it doesn't do anything.
I can't seem to find a solution for this anywhere.
Upvotes: 0
Views: 840
Reputation: 41
Ok, i've checked my repository to see that i was tracking this folder previously, and when i copied these files i've removed this folder which flagged all previously tracked files as "deleted".
So i had to do git rm -r --cached uploads/
and made a commit that removed these files from the repository.
So now my git status is "clean" again.
Upvotes: 1