Change file directory ? #4243
-
Hello, I started hosting/managing my dotfiles with chezmoi. Quite simple for the moment since I just do not do anything crazy. I have a question though. Say I did chezmoi add some/directory/file.rc and then, changed my mind to hold this file to say, $HOME. What am I supposed to do if I want to keep the git commit history of this file and move the file to $HOME for next chezmoi apply call ? So: is this just something like git mv + commit + chezmoi apply ? Something else ? Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
If I understand correctly, you want to know about how to move dotfile(s) from e.g. I could be mistaken, as I don't really use
A The most that a
These changes should also be committed and pushed if chezmoi can't reasonably know when this change has propagated to all of your machines, so it would not be able to remove the entry from |
Beta Was this translation helpful? Give feedback.
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:git mv
should work here).chezmoiremove
chezmoi apply
, which should remove the dotfile(s) from the old path from your$HOME
, and apply the newly moved dotfile(s).chezmoiremove