How do I keep Resharper Files out of SVN?

前端 未结 8 1072
生来不讨喜
生来不讨喜 2021-01-04 04:51

I am using VS2008 and Resharper. Resharper creates a directory _Resharper.ProjectName. These files provide no value for source control that I am aware of and cause issues

相关标签:
8条回答
  • 2021-01-04 05:06

    Store Resharper caches in system temp folder. Check First setting page in r#. Environment -> General -> System -> Store caches ..

    0 讨论(0)
  • 2021-01-04 05:06

    SVN only controls what you put into it when creating your repository. Don't just import your entire project folder but import a "clean" folder BEFORE doing a build. After the build you get all the object files or your _Resharper folder etc. but they are not version controlled.

    I forgot: the

    svn:ignore
    command is another possibility to tell SVN to exclude certain files. You can add this as a property to the version controlled folders, e.g. with TortoiseSVN.

    0 讨论(0)
  • 2021-01-04 05:07

    Add the file names (or even the pattern _Resharper.*) to the svn:ignore property for its parent directory.

    0 讨论(0)
  • 2021-01-04 05:08

    Short answer: the "svn:ignore" property

    Long answer:

    # cd /your/working/copy
    # export EDITOR=vi
    # svn propedit svn:ignore .
    

    (add "_Resharper.ProjectName" on its own line and write the file out)

    Edit: erg... doh, just realized you said tortoise... this is how you do it with the command-line version of SVN

    0 讨论(0)
  • 2021-01-04 05:14

    svn has an "ignore" property you can attach to a filename pattern or a directory. Files and directories that are ignored won't be reported in "svn st" commands and won't go into the repo.

    Example: you have C source code in .c and .h files, but the compiler creates a bunch of .o files that you don't want subversion to bother telling you about. You can use Subversion's properties feature to tell it to ignore these.

    For a few files in one checked-out working directory, for example myproject/mysource/

    bash> svn propedit svn:ignore mysource

    In the text editor that pops up (in linux, probably vi or whatever your EDITOR env var is set to), add one filename pattern per line. Do not put a trailing space after the pattern (this confuses svn).

    *.o
    *.bak

    That's all. You may want to do a commit right away, since sometimes svn gets fussy about users making too many different kinds of changes to files between commits. (my rule is: if in doubt, commit. It's cheap)

    For a type of file appearing in many places in a sprawling directory tree, edit the subversion config file kept inside the repository. This requires the repository administrator's action, unless you have direct access to the repository (not through svn: or http: or file:, but can 'cd' to the repository location and 'ls' its files). The svn books should have the details; i don't recall offhand right now.

    Since i don't use Tortoise, i don't know how directly the description above translates - but that's why we have editable answers (joy!)

    0 讨论(0)
  • 2021-01-04 05:16

    Here's a link to show the ignoring process in TortoiseSVN

    0 讨论(0)
提交回复
热议问题