unison/unison-src/transcripts/reset.md
2024-07-11 09:49:55 -07:00

845 B

scratch/main> builtins.merge
def = "first value"
scratch/main> update
def = "second value"

Can reset to a value from history by number.

scratch/main> update
scratch/main> history
scratch/main> reset 2
scratch/main> view def
scratch/main> history

Can reset to a value from reflog by number.

scratch/main> reflog
-- Reset the current branch to the first history element
scratch/main> reset 2
scratch/main> view def
scratch/main> history

reset branch

foo/main> history
a = 5
foo/main> update
foo/empty> reset /main:
foo/empty> view a
foo/empty> history

second argument is always interpreted as a branch

main.a = 3
foo/main> update
foo/main> history
foo/main> reset 2 main