-
Hi, I've been managing my dotfiles in a repository for years now, using a link script. So I have for example a
Does this make sense? Anything else I need to initialize in the chezmoi repository that would normally be initialized by Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
I came here just now to write exactly this! Interested to hear what the best practices are for migrating a long-existing dotfiles repo. |
Beta Was this translation helpful? Give feedback.
-
Yes, your proposed series of steps sound very reasonable. git should detect the renames and so you'll maintain per-file history.
No, nothing else is needed. Another approach that you might want to consider if you want to do an incremental migration is to use Together this means you'd do something like: $ git clone https://github.com/britter/dotfiles.git ~/.local/share/chezmoi
$ chezmoi cd
$ mkdir home
$ echo home > .chezmoiroot
$ chezmoi add --follow ~/.bashrc
$ rm .bashrc ...and similarly run This has the following advantages:
Hope this helps - please do follow up with any questions. |
Beta Was this translation helpful? Give feedback.
-
Thanks! I ended up just doing |
Beta Was this translation helpful? Give feedback.
Yes, your proposed series of steps sound very reasonable. git should detect the renames and so you'll maintain per-file history.
No, nothing else is needed.
chezmoi init
just creates an empty git repo.Another approach that you might want to consider if you want to do an incremental migration is to use
.chezmoiroot
andchezmoi add --follow
..chezmoiroot
allows you to keep the chezmoi-managed files separate from your link-script managed files (in your case this only matters for thelicenses
directory andREADME.md
as chezmoi ignores everything beginning…