I put some folders in my gitignore but as described in the documentation
A gitignore file specifies intentionally untracked files that Git should ignore. Files already tracked by Git are not affected
So I have to untrack some files and is where my nightmare start
This is my gitignore file
$ cat .gitignore
/.settings/
/.buildpath
/configuration.php
/administrator/cache/*
/images/*
/connectionOracle.php
/administrator/components/com_jsecure/*
/administrator/language/en-GB/*
The last modification made in this file was the addition of the line /images/*
To untrack this folder i follow as described {1}here and {2}here
Following {1}
$ git update-index --assume-unchanged images/*
fatal: Unable to mark file images/02102012_planos.jpg
Question 1: Why can't untrack this specific file?
Following {2}
$ git rm --cached images/ -r
fatal: pathspec 'images' did not match any files
Same result with specific file
$ git rm --cached images/20130626tabela1.jpg
fatal: pathspec 'images/20130626tabela1.jpg' did not match any files
Question 2: Why I receive this error message? Searching here lead me to this but, as I said, these files under /images/ are tracked.
And the Cake Cherry
To verify the list of ignored file I ran this command
$git ls-files --others -i --exclude-standard
That give me a very long list of files inside the images, administrator and mpdf61 folder. The mpdf61 folder is not configured in the gitignore file and neither in info/exclude.
Question 3: Why the mpdf61 appears in this list?
Note: "tracked" means "in the index". "Untracked" means "not in the index". The display of a files untracked-ness is normally suppressed if it's also ignored, so some prefer to call files whose state is "both untracked and ignored" just "ignored", quietly glossing over their "untracked"-ness. Note that the index need not match the current
HEADcommit: that's how you prepare the next commit, by making changes to the index. Those changes become part of a permanent commit only once you make the commit, and the act of making that commit updatesHEADas well.You can't untrack it because it's not tracked. Moreover,
git update-index --assume-unchangeddoes not untrack a file in the first place. Forupdate-indexto update the "assume unchanged" bit, the file must be in the index, so thatupdate-indexhas something to update. Thisfatalerror occurs with the first such untracked (not-in-the-index) file. Nothing else happens to any of the subsequent files named by the shell's expansion of*, asupdate-indexjust stops after the first error.(For instance, if you run
git update-index --assume-unchanged red.txt blue.jpg green.svg, and bothred.txtandgreen.svgare in the index whileblue.jpgis not in the index,update-indexwill mark the index entry forred.txtbut not the one forgreen.svg.)Because that file is also not tracked (not in the index) and therefore cannot be removed from the index. This:
means that no
images/files are (now) in the index. (Perhaps some were before, and are therefore in theHEADcommit, but no longer are, after an earlier successfulgit rm --cached; if so, they should show up ingit statusas "deleted".)Presumably because those file are ignored. There are three "standard" exclusion file classes, as shown in the
git ls-filesdocumentation:(all emphasis mine). You said "the" (as in one) gitignore file, but there may be many, including one within the directory
mpdf61itself, and you may have acore.excludesFileconfigured.To find which ignore directive is ignoring a specific file, use
git check-ignore -v. See thegit check-ignoredocumentation.