Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Revert local changes in fossil

How do I clean/revert/undo local, un-commited changes in a single source file with Fossil?

The clean command looks to me like it should do the trick, but no, the local changes are still there. I am looking for the same effect as "git checkout filename.c" would have.

like image 712
Prof. Falken Avatar asked Jan 12 '23 11:01

Prof. Falken


1 Answers

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
like image 54
ravenspoint Avatar answered Apr 29 '23 08:04

ravenspoint