> From: Tom Avey <toma...@fgbc.org>
> 
> I could use some help with gitignore. I set up a .gitignore file in the 
> root of my project with a line for WEB-INF. Before setting up that 
> .gitignore, the project has already been "init" and "commit" to master as 
> well some branching. Do I have to do anything else?  It appears that git is 
> not ignoring the files in WEB-INF.

I ran into that myself.

I believe the way it works is that if a file is in the current base
commit, it is considered to be "tracked", even if it is also currently
listed in .gitignore.

The solution is to do a commit that removes the undesired files.  The
command is

    git rm -r --cached WEB-INF

This removes everything in WEB-INF from the cache.  (Without removing
it from the working directory!)  Once you commit that change (don't
forget to commit .gitignore as well), git will not notice files in
WEB-INF, as they are listed in .gitignore and are not in the base
commit.

Dale

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to