DEV Community

Discussion on: Sharing .dotfiles cross-platform with a shell script

Collapse
 
dmfay profile image
Dian Fay

Don't copy, symlink! That way you don't have to reinstall every time you tweak something. I use dotbot to keep my dotfiles up to date.

Collapse
 
spoike profile image
Mikael Brassman

Was going to reply the same. I wrote my own bash script to symlink in files to the home directory. You tweak the files and can commit them without having to copy everything over again.

Should look into dotbot, I don’t think it existed when I first started to version control my dot files.

Collapse
 
alloro profile image
Sascha Diefenthäler

I'd say use stow

Collapse
 
ameliagapin profile image
Amelia Gapin

Yup, dotbot is what I use as well. I have shell script that installs a ton of packages I typically use and also kicks off a run of dotbot. It works pretty well on both Mac and Linux and doesn't result in having to do a bunch of work around having my home directory being a repo.

Collapse
 
amcsi profile image
Attila Szeremi⚡ • Edited

Apologies for the confusion. I opt for versioning your home folder directly with Git. As such, no copying necessary.

The bash script in the article is only for the initial install per environment that would copy all the files including the .git folder over to the home directory.

I have amended the article to be more clear about this.