Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Subversion: ignore modifications to a file locally on one client only

Tags:

ignore

svn

Is it possible to ignore changes to a file in subversion locally on one client only, without propagating the ignore to the whole repository?

The particular problem I'm dealing with is that I've checked out a project and modified a bunch of files including the Makefile, which is already part of the repository. Now the environment I'm working on is different from the rest of the group, and I want the changes to the Makefiles to remain local on my machine and not be committed.

However, I don't want to set svn:ignore because that I believe would commit the ignore to the repository, while it is important to keep the make file there.

like image 481
fuad Avatar asked May 21 '09 22:05

fuad


People also ask

How to Add ignore file in svn?

Use the following command to create a list not under version control files. Then edit the file to leave just the files you want actually to ignore. Then use this one to ignore the files listed in the file: svn propset svn:ignore -F ignoring.

How to ignore folder in svn?

Set the svn:ignore property of the parent directory: svn propset svn:ignore dirname . If you have multiple things to ignore, separate by newlines in the property value.

How to remove a file from svn ignore list?

If you want to remove one or more items from the ignore list, right click on those items and select TortoiseSVN → Remove from Ignore List You can also access a folder's svn:ignore property directly.


2 Answers

As with many aspects of svn, tortoise makes it really easy. In fact, I believe tortoise actually adds features by using existing svn features in a systematic way. I realize this answer is windows only, then, but perhaps some people out there are like me and still use windows. In the "Check for Modifications" popup simply right click your files and select "Move to Changelist"->"ignore-on-commit". Now when you checkin using tortoise, it'll segment your changes into the various change lists, so at least you can visually tell what you want to commit and what you don't want to commit.

like image 119
andersonbd1 Avatar answered Sep 24 '22 19:09

andersonbd1


if you use Subversion 1.5.x or higher you can use changelists:

svn cl COMMIT /path/to/project/*  svn cl NOT_COMMIT /path/to/project/Makefile 

Note: with second command Makefile will be removed from first changelist. You can ignore the warning.

Do not commit the second changelist.

do commits via:

svn ci --cl COMMIT -m"<LOG MESSAGE HERE>"  

Important: If you commit without --cl option, ALL your changes will be committed

like image 36
Peter Parker Avatar answered Sep 23 '22 19:09

Peter Parker