I have a Subversion working copy where I made some local modifications to one file. The modifications are only relevant to me, I do not want to commit them. (The version in the repository contains some default values which are suitable for the other users, just not for me, which is why I want to override them locally.)
Note that although I do not want to commit my changes, I do want to receive any updates made in the repository when I do svn update
. Also, it is only in my working copy that I do not want to commit the changes to that file, the other users should not be affected. So svn:ignore
or commit hooks do not fit my purpose.
Currently, I simply do:
svn commit file1 file2...
where I specify explicitly the files that have changes excluding the particular file that I do not want to commit.
However, while I'm working, I have the habit of simply writing:
svn commit -m "Log of what I just did"
and I fear that I will inadvertently commit the "forbidden" file by using the above command at a moment when I'm not attentive.
In short, what I'm looking for is simply a way of "marking" a file in a working copy which prevents Subversion from committing the changes in that file (it doesn't have to be automatic exclusion, even if I just get an error when I try to commit all files, it is fine). Sort of like marking files in a "conflict" state...
Does such a thing exist?
Update: akent, thanks for pointing out this very similar question.
To undo a specific revision you can use the following command: $ svn merge -c -r3745 . In case you have other edited files in working directory, you can commit only the relevant files. Please note that undoing actually will mean you create a new revision with the negatives changes of last commit.
Select any file and/or folders you want to commit, then TortoiseSVN → Commit.... The commit dialog will show you every changed file, including added, deleted and unversioned files. If you don't want a changed file to be committed, just uncheck that file.
SVN stands for Subversion. So, SVN and Subversion are the same. SVN is used to manage and track changes to code and assets across projects.
There have been a few answers that can work:
CoverosGene suggested that the default commands such as svn commit
operate on a default changelist, such that you can exclude a file if you assign it to another changelist, but I can't find any reference of that in the documentation, and in my testing this does not work.
Since there is no good solution for the SVN command-line client, I've opened an enhancement request here. The request suggests that the command-line client could also honor the "ignore-on-commit" changelist.
Update: This is now issue 2858 and there is a feature outline to handle it with an svn:hold
property.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With