# best way to sync .dotfiles under home directory

**URL:** https://forum.syncthing.net/t/best-way-to-sync-dotfiles-under-home-directory/14957
**Category:** User Stories
**Created:** [May 7, 2020, 10:28am UTC](https://forum.syncthing.net/t/best-way-to-sync-dotfiles-under-home-directory/14957 "2020-05-07T10:28:30Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![benibilme](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/b/e5b9ba/32.png) [@benibilme](https://forum.syncthing.net/u/benibilme)
#### Post date: [May 7, 2020, 10:28am UTC](https://forum.syncthing.net/t/best-way-to-sync-dotfiles-under-home-directory/14957/1 "2020-05-07T10:28:31Z")

</div>

Hello,

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?

---

<div class="post-metadata">

### Author: ![calmh](https://forum.syncthing.net/user_avatar/forum.syncthing.net/calmh/32/15311_2.png) [@calmh](https://forum.syncthing.net/u/calmh)
#### Post date: [May 7, 2020, 10:37am UTC](https://forum.syncthing.net/t/best-way-to-sync-dotfiles-under-home-directory/14957/2 "2020-05-07T10:37:20Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![imsodin](https://forum.syncthing.net/user_avatar/forum.syncthing.net/imsodin/32/3317_2.png) [@imsodin](https://forum.syncthing.net/u/imsodin)
#### Post date: [May 7, 2020, 11:10am UTC](https://forum.syncthing.net/t/best-way-to-sync-dotfiles-under-home-directory/14957/3 "2020-05-07T11:10:41Z")

</div>

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:

```
!/.vimrc
!/.bashrc
*

```

---

<div class="post-metadata">

### Author: ![benibilme](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/b/e5b9ba/32.png) [@benibilme](https://forum.syncthing.net/u/benibilme)
#### Post date: [May 7, 2020, 2:02pm UTC](https://forum.syncthing.net/t/best-way-to-sync-dotfiles-under-home-directory/14957/4 "2020-05-07T14:02:28Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![benibilme](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/b/e5b9ba/32.png) [@benibilme](https://forum.syncthing.net/u/benibilme)
#### Post date: [May 7, 2020, 2:04pm UTC](https://forum.syncthing.net/t/best-way-to-sync-dotfiles-under-home-directory/14957/5 "2020-05-07T14:04:52Z")

</div>

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.
