best way to sync .dotfiles under home directory


I am a newbie in syncthing. I would like to hear about your way of sinking .dotfiles under home directory. I am not syncing full home directory, but only selected directories including .vim, .task etc. Since syncthing is not sinking individual files per se, I have difficulty to sink some important .dotfiles under home directory.

This is how I do it now. I am sure there is a better way to do it.

I created .dotfiles directory into which I put all my important .dotfiles such as .bashrc, .bash_profile, .vimrc etc. I create link to home folder via script. I sink this directory via syncthing.

However still I am not content with this option, it still takes management for .dotfiles. I want syncthing to handle it completely if possible.

Could you advise me a model or how you sync these files?

I do what you do, except I then keep the dotfiles in a git repo. I think the collecting them in a single place and symlinking to them is a decent model.


I also use git to track and sync files I care about in my home dir. To avoid having to symlink from another place you can selectively include stuff you care about (that’s what I do in .gitignore, just with a slightly different syntax). I.e. create the Syncthing folder at ~/ and put into .stignore:

1 Like

Thank you for good advices. Actually I am using git as well, but syncthing has decreased for my dependency to git. Even before syncthing, I have been keeping dotfiles in git repository. I was using git as convinient way sharing files, not fully chasing for versioning, but synthing is very fast, I do not have to think about them…I like that…Thank you again.

1 Like

Thank you really for very good advice, I was hesitant to include all home directory. I was not confortable with the syntax and the outcome. Now I learned it.

1 Like