6
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

SVNで.gitignoreを使う

Last updated at Posted at 2019-10-07

.gitignoreをSVNに使う

SVNのignore設定はgitの.gitignoreと文法は同じ。
例えば、Androidプロジェクトの.gitignoreは以下の通りで、これをそのままSVNのリポジトリへ再帰的に無視に設定する。

.gitignore
.svnignore
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild

Step1 改名

.gitignore.svnignoreとして、管理するディレクトリ直下に保存する。

Step2 propset

以下のコマンドで.svnignoresvn:ignoreに当てる。再帰的に強制的に。

cd 管理するディレクトリ
svn propset svn:ignore -R -F .svnignore .

※svnのパスを通すC:\Program Files\Apache-Subversion-1.11.1\binとか

Step3 コミット

.svnignoreをコミットしてしまう。

Step4 無視リストsvn:ignoreを確認

以下のコマンドで、階層以下のすべてで、指定したファイル郡を無視している設定を確認できる。

svn propget -R svn:ignore .

Step5 リポジトリにプロジェクトを追加したら、無視されることを確認

注意

無視に設定しても、これからAddやCommitのときに無視されるだけで、既に管理しているファイルは消えない。
既に管理している上記ファイル郡は手動でDeleteすること。

6
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?