Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I svn:ignore with AnkhSVN?

I am so unbelievably retarded when it comes to Subversion/AnkhSVN. I just don't get it at all. Anytime I do anything outside of updating and committing, everything blows up in my face.

These are my beliefs (which must be incorrect because i can't get Ankh to ignore anything)

  1. svn:ignore is a tool to make your Subversion client always leave certain files or directories OUT of update and commit lists. So, whenever you change any file that's being ignored, Ankh will never try to commit the change nor will it ever update the file. It's essentially invisible to your Subversion client
  2. In order to ignore a file using AnkhSVN, you must
    • right click on the directory in which the file resides
    • select Subversion->Subversion Properties
    • add a new Subversion property with name 'svn:ignore' and in the values box i enter newline-delimited list of things like '*.log' in order to ignore everything file file extension .log in THAT directory.

My assumptions are most certainly incorrect as I've never ever been able to get svn:ignore to work for me. Can anyone please revert me back to sanity by explaining to me which of my assumptions are incorrect and how I'm supposed to approach this?

Thank you.

like image 511
HaterTot Avatar asked Nov 19 '10 01:11

HaterTot


People also ask

How do I ignore a class file in svn?

Another way to ignore files is to add them to the global ignore list. The big difference here is that the global ignore list is a client property. It applies to all Subversion projects, but on the client PC only.

How do I ignore bin and obj folder in svn?

The text box “Global ignore pattern” defines what patterns you want to exclude; in my case I wanted to remove bin and obj folders, and ReSharper related files, which typically contain _ReSharper, so I added bin obj _ReSharper to the list of patterns. Et voila!

How do I ignore target folder in svn?

To ignore files in subversion you want to set the svn:ignore property. You can see more here http://svnbook.red-bean.com/en/1.8/svn.advanced.props.special.ignore.html about half way down. svn propset svn:ignore target . svn propedit svn:ignore .


1 Answers

The first assumption is indeed wrong. svn:ignore only works for unversioned files, it keeps them from being added when you do a recursive add. It's most useful on the command line for that reason.

In AnkhSVN there's a much easier way to add files to the svn:ignore list. Right click any unversioned file and choose Subversion -> Ignore. Inside are options to ignore the single file, all files with the extension etc.

You can right click a changed/added file (hint: use View - Pending Changes to see them all) and click Subversion -> Move to Change List -> ignore-on-commit. This is a change list that AnkhSvn and TortoiseSvn to have the items deselected by default. You can still commit them when you explicitly select them though

like image 103
Sander Rijken Avatar answered Sep 28 '22 09:09

Sander Rijken