I have a cache directory I'm trying to have ignored by git which lives in my CMS's root directory here:
/files/cache/
I've tried the following variations in a .gitignore file at the root of the project:
/files/cache
/files/cache/*
files/cache
files/cache/*
But the files still show up in Tower ready to be staged - the only other thing I can think of is that I'm using comments in the file like this:
# comment
/files/cache
Just not sure what I've missed sorry - any help would be much appreciated
Are the files in question untracked? Please note that files that are already tracked by Git can't be ignored. In that case you'd have to untrack them and commit the deletion, first.
In Tower's "Status" view, which view mode do you use? If we're talking about folders (not only individual files) matched by a pattern, "ALL" mode will continue to show the folder as untracked (while also hiding individual files). "MODIFIED" will hide the matched patterns completely.
git rm --cached file.to.remove
but keep getting the following error -bash: git: command not found
which I don't really understand as git is installed - unless Tower installs a version - CMSCSS 2012-04-06 00:07
git --version
or git rm -r directory-name
CMSCSS 2012-04-06 00:16
export PATH=$PATH:/usr/local/bin:/opt/local/bin:/opt/bin:~/bin
to ~/.profile
but I still can't run git --version
CMSCSS 2012-04-06 00:24
.bash_profile
in my user home directory, 3. running: ~/.bash_profile
in the termina - CMSCSS 2012-04-06 00:28
Put this .gitignore in /files/.gitignore
cache
and commit it.