``` unison def = "first value" ``` ``` ucm Loading changes detected in scratch.u. I found and typechecked these definitions in scratch.u. If you do an `add` or `update`, here's how your codebase would change: ⍟ These new definitions are ok to `add`: def : Text ``` ``` unison def = "second value" ``` Can reset to a value from history by number. ``` ucm scratch/main> update Okay, I'm searching the branch for code that needs to be updated... Done. scratch/main> history Note: The most recent namespace hash is immediately below this message. ⊙ 1. #5vq851j3hg + Adds / updates: def ⊙ 2. #ujvq6e87kp + Adds / updates: def □ 3. #4bigcpnl7t (start of history) scratch/main> reset 2 Done. scratch/main> view def def : Text def = "first value" scratch/main> history Note: The most recent namespace hash is immediately below this message. ⊙ 1. #ujvq6e87kp + Adds / updates: def □ 2. #4bigcpnl7t (start of history) ``` Can reset to a value from reflog by number. ``` ucm scratch/main> reflog Below is a record of recent changes, you can use `reset #abcdef` to reset the current branch to a previous state. Tip: Use `diff.namespace 1 7` to compare between points in history. Branch Hash Description 1. scratch/main #ujvq6e87kp reset ujvq6e87kp4288eq3al9v5luctic0ocd7ug1fu0go5bicrr2vfnrb0... 2. scratch/main #5vq851j3hg update 3. scratch/main #ujvq6e87kp update 4. scratch/main #4bigcpnl7t builtins.merge 5. scratch/main #sg60bvjo91 Project Created -- Reset the current branch to the first history element scratch/main> reset 2 Done. scratch/main> view def def : Text def = "second value" scratch/main> history Note: The most recent namespace hash is immediately below this message. ⊙ 1. #5vq851j3hg + Adds / updates: def ⊙ 2. #ujvq6e87kp + Adds / updates: def □ 3. #4bigcpnl7t (start of history) ``` # reset branch ``` ucm foo/main> history Note: The most recent namespace hash is immediately below this message. □ 1. #sg60bvjo91 (start of history) ``` ``` unison a = 5 ``` ``` ucm foo/main> update Okay, I'm searching the branch for code that needs to be updated... Done. foo/empty> reset /main: Done. foo/empty> view a a : ##Nat a = 5 foo/empty> history Note: The most recent namespace hash is immediately below this message. □ 1. #5l94rduvel (start of history) ``` ## second argument is always interpreted as a branch ``` unison main.a = 3 ``` ``` ucm foo/main> update Okay, I'm searching the branch for code that needs to be updated... Done. foo/main> history Note: The most recent namespace hash is immediately below this message. ⊙ 1. #0i64kpfccl + Adds / updates: main.a □ 2. #5l94rduvel (start of history) foo/main> reset 2 main Done. ```