gpt4 book ai didi

svn - 撤销意外 checkin

转载 作者:行者123 更新时间:2023-12-02 05:02:52 26 4
gpt4 key购买 nike

你正在使用 subversion 并且你不小心在它准备好之前 checkin 了一些代码。例如,我经常:a) checkin 一些代码,然后 b) 稍微编辑一下,然后 c) 按下,输入以重复前面的命令,不幸的是这是一个 checkin 。

是否可以通过 subversion 从服务器撤回这种意外 checkin ?

最佳答案

参见 SVNBook ,特别是“撤消更改”部分,以及反向合并。

Another common use for svn merge is to roll back a change that has already been committed. Suppose you're working away happily on a working copy of /calc/trunk, and you discover that the change made way back in revision 303, which changed integer.c, is completely wrong. It never should have been committed. You can use svn merge to “undo” the change in your working copy, and then commit the local modification to the repository. All you need to do is to specify a reverse difference:

$ svn merge -r 303:302 http://svn.example.com/repos/calc/trunk

澄清一下,您的初始更改将仍在存储库中。但是你现在在以后的修订中收回了它。即存储库已捕获您的所有更改(这确实是您想要的!除非您已 checkin 明文密码或类似密码!)

关于svn - 撤销意外 checkin ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14661879/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com