feat: add link restore
This commit is contained in:
@@ -116,10 +116,16 @@ dangling symlink instead of the contents, while the host resolves it as before.
|
||||
|
||||
```bash
|
||||
ahab link add .env secrets/ # move out, leave symlinks behind
|
||||
ahab link restore .env # move it back into the repository
|
||||
ahab link restore --all # everything this repo has in the store
|
||||
ahab link check # what a sandbox can still read
|
||||
ahab link check --porcelain # `<code> <path>`, for scripts
|
||||
```
|
||||
|
||||
`restore` is the inverse of `add`: the file moves out of the store and back to
|
||||
where it was, and the store keeps nothing. A second checkout linking the same
|
||||
path is left with a dangling symlink, since there is only ever one stored copy.
|
||||
|
||||
The store lives under
|
||||
`${XDG_DATA_HOME:-$HOME/.local/share}/ahab/<host>/<owner>/<repo>/`, derived
|
||||
from the git `origin` remote.
|
||||
|
||||
Reference in New Issue
Block a user