Announcement

Collapse
No announcement yet.

question about add and ignore

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • question about add and ignore

    I want to add the code from my local to svn. The project is never connected with svn before.
    So the first thing is to run "svn add"
    by default, it will add all files and dirs recursively.
    But some of them should be ignored, like *.jar, *.class....
    Running "svn propset -R svn:ignore" after "svn add" seems useless. Those files status are still "Added".
    Is there an easy way to add file/dir recursively but ignore the files I don't want to add?

    thanks,

  • #2
    Running "svn propset -R svn:ignore" after "svn add" seems useless
    Of course it is. You've already added the things you want to ignore. Subversion will never ignore an item if you first tell it to version it.

    Add the filename patterns you always want to ignore to your ~/.subversion/config file. Or add everything, then revert the items (svn revert) you don't want versioned before committing.

    Comment


    • #3
      Originally posted by andyl View Post
      Of course it is. You've already added the things you want to ignore. Subversion will never ignore an item if you first tell it to version it.

      Add the filename patterns you always want to ignore to your ~/.subversion/config file. Or add everything, then revert the items (svn revert) you don't want versioned before committing.
      Any easy way to revert items recursively and automatically?

      For example I want to ignore these in all sub-dirs

      .metadata
      .settings
      .classpath
      .project
      *.class
      *.jar
      ......

      Comment


      • #4
        As andyl said: Add the filename patterns you always want to ignore to your ~/.subversion/config file before running svn add.

        Comment


        • #5
          Originally posted by hairinwind View Post
          Any easy way to revert items recursively and automatically?

          For example I want to ignore these in all sub-dirs

          .metadata
          .settings
          .classpath
          .project
          *.class
          *.jar
          ......
          svn revert -R * from the top level will revert everything. Then fix your config & re-add.

          Comment

          Working...
          X