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

前端 未结 4 1433
余生分开走
余生分开走 2020-12-01 03:25

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

相关标签:
4条回答
  • 2020-12-01 04:00

    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.

    0 讨论(0)
  • 2020-12-01 04:00

    Use svn export to export the file so it's not under version control.

    http://svnbook.red-bean.com/en/1.0/re10.html

    edit: However I believe this has to be done on a per-directory basis, so you'd have to reorganise your files somewhat.

    I can't test this at the moment, but would a sparse checkout help you here?

    http://svnbook.red-bean.com/nightly/en/svn.advanced.sparsedirs.html

    0 讨论(0)
  • 2020-12-01 04:04

    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

    0 讨论(0)
  • 2020-12-01 04:07

    The closest safe solution I can think of is to use a personal branch.

    0 讨论(0)
提交回复
热议问题