veilig
veilig

Reputation: 5135

SVN Import excluding files

I have a project I'm going to be importing into SVN, but I want to keep the existing cache, index, media, etc... out of the repo. What is the best way to do this during an import?

Upvotes: 12

Views: 9175

Answers (3)

gerrie
gerrie

Reputation: 161

I usually work around the selective import problem like this:

  • Create the root folder of your project in the repository
  • Check out that root folder, into your local copy root
  • Now you can choose what must be added and/or ignored
  • And finally you commit the root folder

Slightly more work, but more control.

Upvotes: 11

the_mandrill
the_mandrill

Reputation: 30842

I would say the safest way of doing this is to try to get the cleanest possible directory tree prior to the import, deleting all the files you don't want. Alternatively you can set the global-ignores value in your subversion client config file (~/.subversion/config on Linux/Mac, or accessible via Tortoise SVN -> Settings -> Subversion configuration file).

I'd suggest also setting the svn:ignore properties for each directory once you've done the import to prevent users from accidentally checking these files in.

Upvotes: 1

OnResolve
OnResolve

Reputation: 4032

You can use the svn ignore list. Via the command line:

svn propedit svn:ignore ./path-to-ignore

Upvotes: 1

Related Questions