开发者

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

开发者 https://www.devze.com 2022-12-23 13:39 出处:网络
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

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

精彩评论

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