I have added a pattern to ignore files recursively in exclude file inside .info in .git directory.
pattern : httpdocs/**/bak_*.*
If I commit from httpdocs it is working and from the changed directory it gives error.
git commit -m "formatting js" httpdocs/* [working]
git commit -m "formatting js" httpdocs/dir1/dir2/* [giving below error] #error: pathspec 'httpdocs/dir1/dir2/bak_admin.abc.php' did not match any file(s) known to git.
Basically I want to know why this is happening.