Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to ignore folder during subversion merge

I have a whole bunch of changes that I need to be merged in to my branch but I want to ignore a specific folder during the merge. Is it possible to do this using Subversion? If so then how can I do it?

EDIT: The folder that I want to ignore is in the repository but I don't changes to be made to this folder during the merge

like image 201
Draco Avatar asked Oct 13 '09 11:10

Draco


People also ask

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 .

How do I ignore files in svn?

You can ignore a file or directory like . gitignore. Just create a text file of list of directories/files you want to ignore and run the code below: svn propset svn:ignore -F ignorelist.

Can svn merge be undone?

As long as you haven't commited, you can always do a revert to undo all your changes.


1 Answers

You could do the merge as normal, then do a recursive revert (svn revert -R somefolder) on the folder where you don't want any changes before committing.

Keep in mind that this will introduce inaccuracies in the mergeinfo though. Subversion will think certain changes were merged to "somefolder" while in reality they were not. That will cause some interesting problems if you do want to merge those changes later on.

edit: note that doing a revert of somefolder will implicitly remove any pending conflicts in that folder. There's no "suffering" induced by these conflicts.

like image 149
Wim Coenen Avatar answered Oct 18 '22 16:10

Wim Coenen