简体   繁体   中英

SVN (command-line under Linux) How to ignore some changes (keep them local only) but commit rest of file

Currently in our repository, there is a conf/ folder that I have svn ignored so as to avoid committing local configuration data. However, now I need to add a new configuration option to this file. From my research, the only answer that seems applicable is to change the project structure and have 'config.conf.default' files that everyone can add new options to, and they must copy that file to 'config.conf' and edit it with their local options and svn ignore it. As this is not my project I am working on I would prefer to find a more 'local' solution if their is one.

Changesets don't seem to be helpful in this situation, and constantly manually backing up, reverting, remaking changes I want sync'd, committing and then restoring each config file doesn't sound fun at all.

I read some posts that TortoiseSVN 1.8+ can do this sort of thing, I'm hoping there's a Linux equivalent.

Looking forward to any advice -- thank you

I do not know for certain, but I will be very surprised to hear that TortoiseSVN can do this. What you are asking for runs counter to everything that SVN (and, I might add, any other version control I'm aware of) works.

A file can be either tracked, in which case any change to it is an interesting change, or untracked, in which case none are. Allowing partially tracked files means the version control cannot know whether the change you just made should or should not be tracked. Allowing this is just asking for trouble.

While, technically, TortoiseSVN might have such a feature as an overlay above SVN, in my experience, that's simply not how Tortoise is built. Their design is very nice in that they are simply an SVN client, honoring the same configurations and semantics as the command line tool (for both Windows and Linux). In fact, the fact that Tortoise, the command line tool and the VisualStudio clients all share the same mode of operation is one of the strong points of the tool set, making the experience of working on Windows just a tiny bit more bearable. I really hope Tortoise have not decided to deviate from that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM