您的位置:首页 > 其它

已经加入版本控制的目录文件怎么忽略呢【转载】

2010-11-10 18:34 471 查看
按模块开发,分别编译。因此在update过程中有些模块的代码我不想更新,但这部分模块已经加入到版本控制里了,怎么能忽略对这部分模块的操作呢?

答案如下:
Ignore files which are already versioned
If you accidentally added some files which should have been ignored, how do you get them out of version control without losing them? Maybe you have your own IDE configuration file which is not part of the project, but which took you a long time to set up just the way you like it.

If you have not yet committed the add, then all you have to do is use TortoiseSVN → Revert... to undo the add. You should then add the file(s) to the ignore list so they don't get added again later by mistake.

If the files are already in the repository, you have to do a little more work.

Move the file to somewhere safe, not inside your working copy.

TortoiseSVN → Commit the parent folder. TortoiseSVN will see that the file is missing and you can mark it for deletion from the repository.

Move the file back to its original location.

Add the file to the ignore list so you don't get into the same trouble again.

If you need to remove a whole folder/hierarchy from version control, the procedure is different again.

TortoiseSVN → Export the folder to somewhere safe, not inside your working copy.

TortoiseSVN → Delete the folder from your working copy.

TortoiseSVN → Commit the deleted folder to remove it from the repository.

Move the exported folder back to its original location in your working copy.

Add the folder to the ignore list so you don't get into the same trouble again.
[zz自]http://bbs.iusesvn.com/thread-1070-1-1.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: