gpt4 book ai didi

svn - 撤回意外签到

转载 作者:行者123 更新时间:2023-12-01 18:30:22 25 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 - 撤回意外签到,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/747713/

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