恢复化石的局部变化

Pro*_*ica 3 version-control fossil

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

干净的命令看起来对我来说它应该做的伎俩,但没有,当地的变化仍然存在.我正在寻找与"git checkout filename.c"相同的效果.

rav*_*int 8

fossil revert <filename>
Run Code Online (Sandbox Code Playgroud)

.

>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
Run Code Online (Sandbox Code Playgroud)

  • 哦,读到“如果没有提供文件名,则还原所有文件”直到“如果文件被意外还原,它可以被还原”,这很可怕。:-) (2认同)