1
0
Fork 0
mirror of synced 2024-12-22 06:31:07 -05:00

Add question about tracking system level files (#63)

This commit is contained in:
Tim Byrne 2019-12-08 13:18:54 -06:00
parent 76abafa159
commit 4f9b655a5c
No known key found for this signature in database
GPG key ID: 14DB4FC2465A4B12

View file

@ -159,6 +159,31 @@ https://github.com/TheLocehiliosan/yadm/commits/git-crypt-support
https://github.com/TheLocehiliosan/yadm/commit/efb7fd16612fe650b1286f0c696696f412772ab3
) 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
### How does yadm differ from homeshick?