For example, let say I have a directory imported to svn, called forgotNoIgnoreDirectory, which I forgot to add --no-ignore flag when import to svn, which cause the SVN UI tool hides the newly added files and may cause losing files if I forgot I missed --no-ignore flag in this project. Is there anyway to readd --no-ignore flag to forgotNoIgnoreDirectory?
Note: I don't want to reimport the project because it requires other users to checkout the project again. Also I know I can add --force to a file, but I may forgot to add sometimes. And I don't want a solution that needs extra settings like modifying ~/.subversion/config.
In simple: Instead of delete and import again, I just want a solution, which changes the state of forgotNoIgnoreDirectory, so that forgotNoIgnoreDirectory would behave exactly the same as I added --no-ignore when imported to svn. Is there any to do this?
Running svn import
without the --no-ignore
option will not result in the imported files to be ignored by default.
By default, the files will be ignored during an import (i.e. they will not be imported) if they match an item from the global or local ignore list. For example, if you have the property svn:ignore
set to *.exe
to ignore executable files, no EXE files will be imported.
If this made you miss some files, you can add them later with the usual svn add
command from your working copy.
Ignoring files is quite a topic in Subversion and there are several chapters in the Red Bean Book dedicated to it. Chapter Ignoring Unversioned Items would be the place to start. Subversion will also never ignore files that were added so you cannot ignore away your work by accident.
If there should be an issue with ignored files, checking the svn:ignore
property should be the first step:
svn propget svn:ignore .
# If they're wrong, change them with
svn propedit svn:ignore .
But that's really a different topic.
Note that svn import
imports to a URL, not a working copy. So you will have to svn update
your working copy before you can see the imported files.
So the way to go is:
svn import whatever repo_url
svn update working_copy
# check that all the files are actually there