SVN ignore like .gitignore

后端 未结 3 551
既然无缘
既然无缘 2021-01-29 23:24

In Git, if I have a project with lots of projects inside, let\'s suppose, a lot of Java projects, I can just create a .gitignore file in the root and it will \"be r

3条回答
  •  伪装坚强ぢ
    2021-01-30 00:04

    This is what I am doing to emulate .svnignore.

    Create a wrapper for svn called ~/bin/svn

    #!/bin/bash
    case "$1" in
    commit|status|apply-ignore)
        if test -f .svnignore ; then
            echo "Apply .svnignore: $(/usr/bin/svn propset svn:ignore -F .svnignore .)"
        fi
        ;;
    esac
    case "$1" in
    apply-ignore) ;;
    *) exec /usr/bin/svn "$@" ;;
    esac
    

    Then add ~/bin to your path before /usr/bin

    PATH=~/bin:$PATH ; export PATH
    

    It applies .svnignore on commit and status commands, and can also manually apply using svn apply-ignore.

提交回复
热议问题