gpt4 book ai didi

svn - 强制旧版本成为最新版本 - SVN

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

我有一个旧的修订版,效果非常好,我想撤销我在 SVN 中所做的过去的几个修订版。我怎样才能简单地删除这些修订并使 HEAD 成为特定的修订。这样,当我按下更新时,它会转到那个版本,而不是真正的当前版本?

最佳答案

来自 svn 书:

Undoing Changes

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
U integer.c

$ svn status
M integer.c

$ svn diff

# verify that the change is removed


$ svn commit -m "Undoing change committed in r303."
Sending integer.c
Transmitting file data .
Committed revision 350.

有关更多详细信息,请参阅 "Undoing Changes" section 的其余部分.

关于svn - 强制旧版本成为最新版本 - SVN,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13885640/

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