Posted by Marius D.
on February 25, 2010 / Posted in Uncategorized
How many times have you spent countless hours writing code just to realize you’ve either overwritten or accidentally deleted your files? How many times have you been working with a team of developers just to realize your coworker has overwritten your code?
This has unfortunately happened to the best of us at one point or another. This issue usually prompts us to look for a way to easily backup our code and share it between multiple developers. On our journey, we find many different flavors of source/revision control. Dependent upon your preference there are multiple options available, some free, some purchased. For more information on source control visit Wikipedia.
For those of you that have chosen Tortoise SVN, a windows shell integrated CVS source control solution, you may find it unnecessary to save files or folders created by plug-ins and visual studio. These files can be very annoying as they usually change every time you open up your solution, or build your application. A popular plug-in for Visual Studio that creates extra files and folders is ReSharper. I will focus on removing the files created by this plug-in.
As you can see, ReSharper folders and files are available to add to the source control by default.
In order to tell Tortoise SVN to ignore the files and folders created by ReSharper and to not list them every time we commit our files, we have to add the extensions/folders to Tortoise SVN’s global ignore pattern text box.
Ignore pattern to ignore ReSharper Created files:
Ignore pattern to ignore Visual Studio Files which shouldn’t be source controlled:
*\bin* *\obj* *.suo *.user
Combined Ignore pattern to ignore both Visual Studio and ReSharper files:
*\bin* *\obj* *.suo *.user **.ReSharper** **\_ReSharper.**
Adding any of these “ignore” rules is simple. First identify the rule you want to add; I recommend the combined rule, and then:
1. Right click on any of your repositories, hover over TortoiseSVN menu option, and click on the Settings sub link.
2. Add the rule you have chosen to the global ignore pattern and remember to click “OK”.
That’s it! Now when you try to commit your changes, you won’t see any of those annoying extra files!