When I type ‘git status’
the output is
# On branch master
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# var/cache/
# var/locks/
# var/session/
nothing added to commit but untracked files present (use "git add" to track)
then I try to use
git status var/cache/
and it return
error: pathspec 'var/cache/' did not match any file(s) known to git.
So how could I can check the status at the cache folder and locks folder
Thanks for any advice.
Yuan
Kevin’s answer is absolutely right: In order to be able to track changes in files, you have to tell git that you want to track changes at all.
add the directories to the index:
git add var/cache/git add var/locks/git add var/session/commit their current state:
git commit -m "initial"NOW you are able to ask git for
git status var/cacheand git will tell you what has changed.