Subversion: prevent local modifications to one file from being committed?

前端 未结 13 711
名媛妹妹
名媛妹妹 2020-12-01 04:17

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

13条回答
  •  自闭症患者
    2020-12-01 04:58

    Add all files to a changelist and then remove the files you do not want to commit. Finally commit the changelist as shown below:

    $ svn status
    M file01 
    M ...
    M file100
    M file_not_ready_for_commit
    
    // This will add all working copy files, can be adjusted to add only relevant files
    $ svn changelist mychangelist -R .
    
    // Remove the nascent one(s)
    $ svn changelist mychangelist --remove file_not_ready_for_commit
    
    // Commit only the files in the changelist
    $ svn commit --changelist mychangelist
    

    Source of above information is this blog which also has a link to http://svnbook.red-bean.com for further details. All credits to the author of the blog.

提交回复
热议问题