gpt4 book ai didi

version-control - 恢复化石的局部变化

转载 作者:行者123 更新时间:2023-12-04 07:10:15 25 4
gpt4 key购买 nike

如何使用 Fossil 在单个源文件中清除/恢复/撤消本地未提交的更改?

clean命令在我看来应该可以解决问题,但是不,本地更改仍然存在。我正在寻找与“git checkout filename.c”相同的效果。

最佳答案

fossil revert <filename>

.
>fossil help revert
Usage: fossil revert ?-r REVISION? ?FILE ...?

Revert to the current repository version of FILE, or to
the version associated with baseline REVISION if the -r flag
appears.

If FILE was part of a rename operation, both the original file
and the renamed file are reverted.

Revert all files if no file name is provided.

If a file is reverted accidently, it can be restored using
the "fossil undo" command.

Options:
-r REVISION revert given FILE(s) back to given REVISION

See also: redo, undo, update

关于version-control - 恢复化石的局部变化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18605670/

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