开发者

In SVN, how do I revert ONE file back to a certain revision?

Just one file, not the entire directory. Than开发者_JS百科ks.


Updating to an old revision is rarely going to be what you want, because this will not allow you to make changes based on that old revision — SVN will complain about the file being out of date.

What you probably want to do is a reverse merge. This will make the old revision the new HEAD revision.

# roll back to revision 200, making it the new HEAD
svn merge -r HEAD:200 theone.file
svn commit


svn up -r200 theone.file
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜