I use TortoiseSVN 1.7.9.
How can I ignore / remove contents from /bin
folder when I svn commit
the project folder? I don't want to commit files such as .dll
, .pdb
, etc.
I put .dll
.pdb
entry in svn:ignore property but it does not work and these files still show up in the list when I perform a commit.
I don't use command line client. In Windows Explorer I right-click on root project folder and click commit in TortoiseSVN context menu.
That means the Subversion status is normal. As soon as you start editing a file, the status changes to modified and the icon overlay then changes to a red exclamation mark. That way you can easily see which files were changed since you last updated your working copy and need to be committed.
Select any file and/or folders you want to commit, then TortoiseSVN → Commit.... The commit dialog will show you every changed file, including added, deleted and unversioned files. If you don't want a changed file to be committed, just uncheck that file.
If you right-drag the folder and use "SVN move versioned item(s) here", then you keep the history. Even the history of the files within the folder.
If you want to undo all changes you made in a file since the last update you need to select the file, right click to pop up the context menu and then select the command TortoiseSVN → Revert A dialog will pop up showing you the files that you've changed and can revert. Select those you want to revert and click on OK.
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.
To ignore bin, obj and .suo files and user file from all projects. Just add them to the config file in:
C:\Users\[USERNAME]\AppData\Roaming\Subversion\config ( in windows )
Locate global-ignores part and add the following:
global-ignores = *.suo bin obj *.csproj.user
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With