From 8c8029597161928558497d7144ee7fae3baaff66 Mon Sep 17 00:00:00 2001 From: Flancian <0@flancia.org> Date: Sat, 11 Jun 2022 23:41:13 +0200 Subject: [PATCH] autopushed --- chezmoi.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/chezmoi.md b/chezmoi.md index 14d9bd8ec..ee771b9ac 100644 --- a/chezmoi.md +++ b/chezmoi.md @@ -19,7 +19,7 @@ git add . git commit -m 'Initial commit from paramita." ``` -After creating an empty repo in any host (I used [[gitlab]]), you can upload the local repo as per usual [[git]] instructions: +After creating an empty repo in any host (I used [[gitlab]]), you can upload the local repo you cd'd into above as per standard [[git]] procedure: ``` git remote add origin git@gitlab.com:flancian/flancian.git @@ -27,7 +27,7 @@ git branch -M main git push -u origin main ``` -Then for syncing into a new machine, you just pass the repo as argument to `chezmoi init`: +Then for syncing files into a new machine, you install chezmoi and then pass the repo as argument to `chezmoi init`: ``` sh -c "`curl -fsLS chezmoi.io/get`" @@ -35,7 +35,8 @@ chezmoi init https://gitlab.com/flancian/flancian chezmoi apply -v ``` -To upload changes to files already tracked by chezmoi: +To upload changes to files already tracked by chezmoi from any host: + ``` chezmoi readd chezmoi cd @@ -43,3 +44,5 @@ git commit -a -m "chezmoi from $HOSTNAME" git push ``` +[[Chezmoi]] supports [[templates]] to special-case files depending on the host they're being installed in, but I haven't experimented with them yet. +