Subversion - Import a Directory While Ignoring Some of Its Content
Submitted by Kevin Kleinfelter on Mon, 2009-08-31 00:19.
First, my assumptions:
- Your repository URL is file:///tmp/foo-repo
- Your project directory is project1.
- Your current working directory is project1.
Here's how:
- svn mkdir -m "Adding just the project1 directory." -m file:///tmp/foo-repo/project1
- svn co file:///tmp/foo-repo/project1 .
- Don't miss that trailing period!
- Here you have two choices.
- If you want to ignore the directories completely:
- Add the directory names to "svnignores.txt"
- svn propset svn:ignore -F svnignores.txt .
- If you want to ignore the CONTENT of the directories (i.e. to check-in the directories and keep the directory empty in the repository):
- svn propset svn:ignore '*' directoryName1
- svn propset svn:ignore '*' directoryName2
- svn add *
- svn commit -m "Adding the contents of the project1 directory."

Delicious
Digg
Reddit