Put configuration files (dot files) into the version control system.
To use saved files just create symbolic links to them.
This tool provides you with all the required automation by a single command.
Dot tool iterates over the current directory (including subdirectories) and creates symbolic links from ${HOME} to all files inside the current directory.
Source, target directories can be paramerized, HOME is the reasonable default.
Backup files will be generated before the creation of symbolic links (to preserve the existing content of the files that may be different than those you want to link).
No specific layout (directory structure) or additional configuration files are required, just run the program inside the directory which contains your dot files.
dot link
- Put the binary (latest release) under PATH
- Use it from any directory (from your git repository or any other folder)
You must have additional privileges to create symbolic links. You can set permissions here:
Configuration \ Windows Settings \ Security Settings \ Local Policies \ User Rights Assignment\ Create symbolic links
By default Administrator can create symbolic links. Make sure you run Git bash as an administrator.
- This implementation supports the simplest scenario to create symlinks, restore a regular file, and creating backup files before any symlink is introduced.
- The composition of settings for different operation systems/platforms/devices can be done manually.
common unix settings
ubuntu settings
mac settings
Corresponding settings can be versioned in separate directories as you like and after that, you can call this tool manually from the selected directories. - Links will be created only for files not for directories, all missing parent directories will be created.
nested directory example
Run the tool inside the dotfiles directory. - There is no goal to reimplement inside this tool some functionality of the version control system (to add/remove tracked files, checking changes, etc), or ansible (to distribute files across multiple devices/instances).
- You can try to use this tool for system files (/etc/something) using --target parameter if you have corresponding permissions to write to the target directory.
- There is no intent to introduce extensive configuration settings,
because in that case, it's easier to use a generic programming language and implement all required functionality using it.
There is no profit to have just another indirection level for coping files, creating symbolic links, etc.
- missing-semester-course
- dotfiler
- dotfiles
- homesick
- dotfiles.github
- atlassian.dotfiles bare git repo (nice, but it is hard to use dotfiles that are splitted into different repositories)
- stow (nice, but
a) I found it too late;
b) there is no backup functionality;
c) I wanted an interface that as simple as possible to cover the default case;
d) stow has a little bit different ideology, for example about tree-folding.
Why tree-folding (symlinks for the directory) is not implemented within this tool:
the common and specific settings like overrides\extensions\customizations can be stored in different directories\repositories while they are using the same directory structure.
In that case we have more than one target directory (with the base settings, with overrides\extensions) and that's why it's not possible to figure out what target directory should be used for the symbolic link. - lndir cannot handle relative directories, user experience is not so nice (not informative errors)
- chezmoi too complicated for such trivial task, for multiple machines it's easier to have different folders (extract different parts and link it separately), than to have templates and code inside it (because it's hard to support files with multiple conditional statements inside it for different platforms).
- dotbot too complicated + config is required
Thanks to all of these projects for the idea!