18

TortoiseSVN 1.7.9 を使用しています。

プロジェクトフォルダーの場合、フォルダーの内容を無視/削除するにはどうすればよいですか? 、などのファイルをコミットしたくありません。/binsvn commit.dll.pdb

svn:ignore.dll .pdbプロパティにエントリを入れましたが、機能せず、コミットを実行してもこれらのファイルがリストに表示されます。

コマンド ライン クライアントは使用しません。Windows エクスプローラーで、ルート プロジェクト フォルダーを右クリックし、TortoiseSVN コンテキスト メニューで [commit] をクリックします。

4

4 に答える 4

23

You can find the answer in the TortoiseSVN manual and SVNBook.

TortoiseSVN Manual tells us:

If the files are already in the repository, they have to be deleted from the repository and added to the ignore list. Fortunately TortoiseSVN has a convenient shortcut for doing this. TortoiseSVN → Unversion and add to ignore list will first mark the file/folder for deletion from the repository, keeping the local copy. It also adds this item to the ignore list so that it will not be added back into Subversion again by mistake. Once this is done you just need to commit the parent folder.

See the important note from SVNBook; it explains the behavior and "why it does not work" in your case.

Subversion's support for ignorable file patterns extends only to the one-time process of adding unversioned files and directories to version control. Once an object is under Subversion's control, the ignore pattern mechanisms no longer apply to it. In other words, don't expect Subversion to avoid committing changes you've made to a versioned file simply because that file's name matches an ignore pattern—Subversion always notices all of its versioned objects.

于 2012-10-16T11:41:33.593 に答える
12

すべてのプロジェクトの bin、obj、.suo ファイル、およびユーザー ファイルを無視します。それらを設定ファイルに追加するだけです:

C:\Users\[USERNAME]\AppData\Roaming\Subversion\config ( in windows )

global-ignores 部分を見つけて、次を追加します。

global-ignores = *.suo bin obj *.csproj.user
于 2015-03-23T21:27:26.993 に答える
3

基本的な答え: コンパイル済みのライブラリとバイナリをソース リポジトリに保存しないでください。ソースリポジトリです!

Subversion の制御下にあるものを無視することはできません。ビルドされたアイテムは、そもそも Subversion に保存されるべきではありません。それらを削除してから、svn:ignoreビルド時にこれらのディレクトリを無視するようにセットアップします。そうすれば、これらのビルドされたバイナリを誤って再コミットすることはありません。

後で使用するためにバイナリとライブラリを保存する場合は、そのためにリリース リポジトリを使用します。実際、ビルドが他のプロジェクトから必要な .dll を自動的にダウンロードするように設定することもできます。リリース リポジトリは、これらのファイルが保存されている別のシステム上のディレクトリのような単純なもの (および他のプロジェクトにコピーできる) から、Artifactory や Nexus のようなより複雑なもの (Maven および Ivy プロジェクトに使用されるもの) にすることができます。 VS および C/C++ プロジェクトにも似たようなものがあると思います)。

または、Jenkinsを使用してビルドを行い、これらのアイテムを Jenkins ジョブのビルド済みアーティファクトとして保存することもできます。必要な人は、Jenkins からダウンロードできます。

于 2012-10-16T16:04:04.940 に答える