Add question about tracking system level files (#63)
This commit is contained in:
parent
76abafa159
commit
4f9b655a5c
1 changed files with 25 additions and 0 deletions
|
@ -159,6 +159,31 @@ https://github.com/TheLocehiliosan/yadm/commits/git-crypt-support
|
||||||
https://github.com/TheLocehiliosan/yadm/commit/efb7fd16612fe650b1286f0c696696f412772ab3
|
https://github.com/TheLocehiliosan/yadm/commit/efb7fd16612fe650b1286f0c696696f412772ab3
|
||||||
) in the commit messages of that branch for details.
|
) in the commit messages of that branch for details.
|
||||||
|
|
||||||
|
## Unconventional Cases
|
||||||
|
|
||||||
|
### Can I use yadm to track system level files?
|
||||||
|
|
||||||
|
yadm only manages files within the configured worktree (`$HOME` by default).
|
||||||
|
Also, yadm will use the effective user for file ownership just like Git.
|
||||||
|
However, if you want to bend yadm into managing system files, one method is:
|
||||||
|
|
||||||
|
```
|
||||||
|
# create an alias to run yadm for system files
|
||||||
|
alias sysyadm="sudo yadm -Y /etc/yadm"
|
||||||
|
|
||||||
|
# initialize the yadm repo using the worktree of "/"
|
||||||
|
sysyadm init -w /
|
||||||
|
|
||||||
|
# continue to use sysyadm for managing system files
|
||||||
|
sysyadm add /etc/something.conf
|
||||||
|
sysyadm commit -m 'Add something.conf'
|
||||||
|
```
|
||||||
|
|
||||||
|
Assuming you have "sudo" rights, the `sysyadm` alias will work as if root was using
|
||||||
|
yadm, having the owner be "root", with the ability to manage any file under `/`.
|
||||||
|
If you were only interested in managing files under `/etc`, you could use that as
|
||||||
|
the worktree instead.
|
||||||
|
|
||||||
## Comparisons
|
## Comparisons
|
||||||
|
|
||||||
### How does yadm differ from homeshick?
|
### How does yadm differ from homeshick?
|
||||||
|
|
Loading…
Reference in a new issue