syntagma
syntagma

Reputation: 24344

Git repo with files from multiple directories (dotfiles syncing)

I would like to create a repo with my dotfiles and some other files I would like to sync across multiple machines. The files are spread across several directories (not only ~ home directory).

Can git keep track of files from several directories that are not necessarily subdirectories to where .git/ is stored?

The best solutions I've come up right now is to make a script to copy dotfiles into single directory where git repo has been init.

Upvotes: 1

Views: 592

Answers (1)

jbr
jbr

Reputation: 6258

What people normally do is have a git repo somewhere, say ~/.dotfiles and then use symbolic links from that directory to where the dot file should be.

See dotfiles on Github for more inspiration.

Upvotes: 2

Related Questions