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

标签 version-control fossil

如何使用 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/

相关文章:

git - jenkins调试单片机

git - 有什么好的、跨平台的、Mac、Win32、*nix、Git GUI 客户端吗?

mercurial - 如何从 Mercurial 导出到化石?

fossil - 保护化石中的主干,类似于拉取请求

Git - 将更改从克隆 pull 回主服务器

visual-studio-2010 - 将 *.sdf 文件添加到 .gitignore 的可能影响

git - 如何在一个 Git 仓库中实现/管理多个项目?

dvcs - 使用 Fossil DVCS 重命名目录

fossil - 化石可以在我的 shell 脚本上保留可执行模式吗?

workflow - Fossil 的典型工作流程是什么,特别是与 git 相比?