dot - simple dotfiles tracking
dot provides a cli application which will streamline the process of adding
and removing files to and from your archive. Using dot in combination with
an hosted repository you'll be able to backup, restore and sync your dotfiles
for several machines. Why would you want your dotfiles hosted in a
repository? For the answer and much more click
here.
dot works by placing a selected dotfile into the archive and symlinking it
to its original location. The archive serves as a repository and can be
persisted using a hosted git repository.
Installation
For this version make sure you have Go installed. And run the
following commands:
$ go get -u github.com/erroneousboat/dot
$ dot --help
Or copy one of the binaries present in the bin/ folder.
Setting up
To begin using dot we need to create a folder in your home folder where we
will track the dotfiles. And initializing a git repository.
$ mkdir ~/dotfiles/
$ git init
Usage
To start using dot, go to the newly created directory and issue the
following command:
$ dot sync
This will initialize the necessary folder and create a .dotconfig
configuration file which will automatically be tracked in the archive.
Tracking files or folders
You can use the following command to start tracking files or folders:
# dot add [name] [path/to/file]
$ dot add nvimrc /home/erroneousboat/.nvimrc
To remove a file or folder for tracking, use the following command:
# dot rm [name]
$ dot rm nvimrc
In order to automatically create a git commit message and push to the
repository, pass in the -p or --push flag. You can use this for both the
add and remove command.
$ dot add -p nvimrc /home/erroneousboat/.nvimrc
Additional machines
So you've started tracking your files on one machine but now you want to use
your archive on another machine. Clone your repository on the additional
machine and use the dot sync command to start synchronizing your files on the
new machine.