Skip to content

Change file directory ? #4243

Closed Answered by bradenhilton
xmailla asked this question in Q&A
Jan 30, 2025 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

If I understand correctly, you want to know about how to move dotfile(s) from e.g. $HOME/A to $HOME/B. Is that correct?

I could be mistaken, as I don't really use .chezmoiremove, so proceed with caution and perhaps try it with a set of test dotfiles first, but I believe the recommended method is something like the following:

  1. Move the dotfile(s) to the new path in your chezmoi source state (git mv should work here)
  2. Add the old path as an entry in .chezmoiremove
  3. Run chezmoi apply, which should remove the dotfile(s) from the old path from your $HOME, and apply the newly moved dotfile(s)
  4. Commit and push the newly moved dotfile(s) as well as .chezmoiremove
  5. Once you are certain that this chang…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@xmailla
Comment options

Answer selected by xmailla
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants