2024-07-04 02:10:35 +03:00
|
|
|
First we make some changes to the codebase so there's data in the reflog.
|
2019-10-11 01:45:53 +03:00
|
|
|
|
2024-07-10 17:46:18 +03:00
|
|
|
``` unison
|
2019-10-11 01:45:53 +03:00
|
|
|
x = 1
|
|
|
|
```
|
|
|
|
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2019-10-11 01:45:53 +03:00
|
|
|
|
2023-12-22 14:55:24 +03:00
|
|
|
Loading changes detected in scratch.u.
|
|
|
|
|
2019-10-11 01:55:19 +03:00
|
|
|
I found and typechecked these definitions in scratch.u. If you
|
|
|
|
do an `add` or `update`, here's how your codebase would
|
|
|
|
change:
|
2019-10-11 01:45:53 +03:00
|
|
|
|
2019-10-11 01:55:19 +03:00
|
|
|
⍟ These new definitions are ok to `add`:
|
|
|
|
|
2019-11-14 00:57:51 +03:00
|
|
|
x : Nat
|
2019-10-11 01:55:19 +03:00
|
|
|
|
2019-10-11 01:45:53 +03:00
|
|
|
```
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2024-07-03 21:22:09 +03:00
|
|
|
scratch/main> add
|
2019-10-11 01:45:53 +03:00
|
|
|
|
2019-10-11 01:55:19 +03:00
|
|
|
⍟ I've added these definitions:
|
|
|
|
|
2019-11-14 00:57:51 +03:00
|
|
|
x : Nat
|
2019-10-11 01:55:19 +03:00
|
|
|
|
2019-10-11 01:45:53 +03:00
|
|
|
```
|
2024-07-10 17:46:18 +03:00
|
|
|
``` unison
|
2019-10-11 01:45:53 +03:00
|
|
|
y = 2
|
|
|
|
```
|
|
|
|
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2019-10-11 01:45:53 +03:00
|
|
|
|
2023-12-22 14:55:24 +03:00
|
|
|
Loading changes detected in scratch.u.
|
|
|
|
|
2019-10-11 01:55:19 +03:00
|
|
|
I found and typechecked these definitions in scratch.u. If you
|
|
|
|
do an `add` or `update`, here's how your codebase would
|
|
|
|
change:
|
2019-10-11 01:45:53 +03:00
|
|
|
|
2019-10-11 01:55:19 +03:00
|
|
|
⍟ These new definitions are ok to `add`:
|
|
|
|
|
2019-11-14 00:57:51 +03:00
|
|
|
y : Nat
|
2019-10-11 01:55:19 +03:00
|
|
|
|
2019-10-11 01:45:53 +03:00
|
|
|
```
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2024-07-03 21:22:09 +03:00
|
|
|
scratch/main> add
|
2019-10-11 01:45:53 +03:00
|
|
|
|
2019-10-11 01:55:19 +03:00
|
|
|
⍟ I've added these definitions:
|
|
|
|
|
2019-11-14 00:57:51 +03:00
|
|
|
y : Nat
|
2019-10-11 01:55:19 +03:00
|
|
|
|
2024-07-04 02:10:35 +03:00
|
|
|
scratch/main> branch /other
|
2019-10-11 01:55:19 +03:00
|
|
|
|
2024-07-04 02:10:35 +03:00
|
|
|
Done. I've created the other branch based off of main.
|
|
|
|
|
|
|
|
Tip: To merge your work back into the main branch, first
|
|
|
|
`switch /main` then `merge /other`.
|
|
|
|
|
|
|
|
scratch/other> alias.term y z
|
|
|
|
|
|
|
|
Done.
|
|
|
|
|
|
|
|
newproject/main> builtins.merge lib.builtins
|
|
|
|
|
|
|
|
Done.
|
|
|
|
|
|
|
|
newproject/main> alias.type lib.builtins.Nat MyNat
|
|
|
|
|
|
|
|
Done.
|
2019-10-11 01:55:19 +03:00
|
|
|
|
2019-10-11 01:45:53 +03:00
|
|
|
```
|
2024-07-04 02:10:35 +03:00
|
|
|
Should see reflog entries from the current branch
|
|
|
|
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2024-07-03 21:22:09 +03:00
|
|
|
scratch/main> reflog
|
2019-10-11 01:55:19 +03:00
|
|
|
|
2024-07-04 02:10:35 +03:00
|
|
|
Below is a record of recent changes, you can use
|
|
|
|
`reset #abcdef` to reset the current branch to a previous
|
|
|
|
state.
|
2022-08-26 19:53:29 +03:00
|
|
|
|
2024-07-04 02:10:35 +03:00
|
|
|
Tip: Use `diff.namespace 1 7` to compare between points in
|
|
|
|
history.
|
|
|
|
|
2024-07-10 00:45:11 +03:00
|
|
|
Branch Hash Description
|
|
|
|
1. scratch/main #6mdl5gruh5 add
|
|
|
|
2. scratch/main #3rqf1hbev7 add
|
2024-07-11 19:38:50 +03:00
|
|
|
3. scratch/main #ms9lggs2rg builtins.merge scratch/main:lib.builtins
|
2024-07-10 00:45:11 +03:00
|
|
|
4. scratch/main #sg60bvjo91 Project Created
|
2019-10-11 01:55:19 +03:00
|
|
|
|
2019-10-11 01:45:53 +03:00
|
|
|
```
|
2024-07-04 02:10:35 +03:00
|
|
|
Should see reflog entries from the current project
|
2019-10-11 01:55:19 +03:00
|
|
|
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2024-07-04 02:10:35 +03:00
|
|
|
scratch/main> project.reflog
|
2024-07-03 21:22:09 +03:00
|
|
|
|
2024-07-04 02:10:35 +03:00
|
|
|
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.
|
|
|
|
|
2024-07-10 00:45:11 +03:00
|
|
|
Branch Hash Description
|
2024-07-11 19:38:50 +03:00
|
|
|
1. scratch/other #148flqs4b1 alias.term scratch/other:.y scratch/other:z
|
2024-07-10 00:45:11 +03:00
|
|
|
2. scratch/other #6mdl5gruh5 Branch created from scratch/main
|
|
|
|
3. scratch/main #6mdl5gruh5 add
|
|
|
|
4. scratch/main #3rqf1hbev7 add
|
2024-07-11 19:38:50 +03:00
|
|
|
5. scratch/main #ms9lggs2rg builtins.merge scratch/main:lib.builtins
|
2024-07-10 00:45:11 +03:00
|
|
|
6. scratch/main #sg60bvjo91 Project Created
|
2019-10-11 01:55:19 +03:00
|
|
|
|
2019-10-11 01:45:53 +03:00
|
|
|
```
|
2024-07-04 02:10:35 +03:00
|
|
|
Should see reflog entries from all projects
|
2024-07-03 21:22:09 +03:00
|
|
|
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2024-07-04 02:10:35 +03:00
|
|
|
scratch/main> reflog.global
|
2024-07-03 21:22:09 +03:00
|
|
|
|
2024-07-04 02:10:35 +03:00
|
|
|
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.
|
|
|
|
|
2024-07-10 00:45:11 +03:00
|
|
|
Branch Hash Description
|
2024-07-11 19:38:50 +03:00
|
|
|
1. newproject/main #2rjhs2vq43 alias.term newproject/main:lib.builtins.Nat newproject/main:...
|
|
|
|
2. newproject/main #ms9lggs2rg builtins.merge newproject/main:lib.builtins
|
2024-07-10 00:45:11 +03:00
|
|
|
3. newproject/main #sg60bvjo91 Branch Created
|
2024-07-11 19:38:50 +03:00
|
|
|
4. scratch/other #148flqs4b1 alias.term scratch/other:.y scratch/other:z
|
2024-07-10 00:45:11 +03:00
|
|
|
5. scratch/other #6mdl5gruh5 Branch created from scratch/main
|
|
|
|
6. scratch/main #6mdl5gruh5 add
|
|
|
|
7. scratch/main #3rqf1hbev7 add
|
2024-07-11 19:38:50 +03:00
|
|
|
8. scratch/main #ms9lggs2rg builtins.merge scratch/main:lib.builtins
|
2024-07-10 00:45:11 +03:00
|
|
|
9. scratch/main #sg60bvjo91 Project Created
|
2024-07-03 21:22:09 +03:00
|
|
|
|
2024-07-04 02:10:35 +03:00
|
|
|
```
|