TheLocehiliosan / yadm

Yet Another Dotfiles Manager
https://yadm.io/
GNU General Public License v3.0
4.94k stars 178 forks source link

How to restore some configs which have been stored in yadm repo in convenient way ? #352

Closed oldunclez closed 2 years ago

oldunclez commented 3 years ago

This question is about

Describe your question

I have added /etc/nginx , /etc/postfix , /etc/zabbix in to yadm repo, and then push it the remote git repo .

Now , I have a new computer , and want to only restore /etc/nginx into it . Is there any convenient way to achieve it ? such as shortcut command , yadm pull-and-restore /etc/nginx ?

or should I do it manually ?

git  clone http://a-remote-git-repo/yadm.git
cp -a  yadm/etc/nginx    /etc/. 
Animeshz commented 2 years ago

Have you found a way 👀?

TheLocehiliosan commented 2 years ago

@oldunclez - yadm is designed to manage files in-place (usually those in a user's $HOME). You're question is about files in /etc. Are you initializing yadm using an alternative worktree? If so, you should also specify that alternative worktree when the repo is cloned.

If you want to exclude a portion of the repo, you might want to try using sparse-checkout, as mentioned in #157.

github-actions[bot] commented 2 years ago

This issue has been labeled as stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 2 years ago

This issue was closed because it has been labeled as stale for 7 days with no activity.

xeruf commented 1 year ago

Also see #63