| 1 |
# Getting started |
| 2 |
|
| 3 |
## Repository setup |
| 4 |
|
| 5 |
Either create a Git repository on your prefered platform and clone it or create one locally. |
| 6 |
This repository will contain two main elements, dotdrop's config file (`config.yaml`) |
| 7 |
and a directory containing all your dotfiles managed by dotdrop. |
| 8 |
```bash |
| 9 |
## clone your repository (my-dotfiles) |
| 10 |
$ git clone <some-url>/my-dotfiles |
| 11 |
$ cd my-dotfiles |
| 12 |
|
| 13 |
## within the repository create a directory to store your dotfiles |
| 14 |
## (refered by "dotpath" in the config, which defaults to "dotfiles") |
| 15 |
$ mkdir dotfiles |
| 16 |
``` |
| 17 |
|
| 18 |
Then generate a base config file: |
| 19 |
```bash |
| 20 |
$ dotdrop gencfg > config.yaml |
| 21 |
``` |
| 22 |
|
| 23 |
It is recommended to store your config file directly within your repository |
| 24 |
(*my-dotfiles* in the example above), but you could save it in different places if you wish; |
| 25 |
see [config location](config/config-file.md#location) for more. |
| 26 |
|
| 27 |
```bash |
| 28 |
$ tree my-dotfiles |
| 29 |
my-dotfiles |
| 30 |
├── config.yaml |
| 31 |
└── dotfiles |
| 32 |
``` |
| 33 |
|
| 34 |
If your config file is in an exotic location, you can add an alias |
| 35 |
in your preferred shell to call dotdrop with the config file path argument. |
| 36 |
``` |
| 37 |
alias dotdrop='dotdrop --cfg=<path-to-your-config.yaml>' |
| 38 |
``` |
| 39 |
|
| 40 |
For more info on the config file format, see [the config file doc](config/config-file.md). |
| 41 |
|
| 42 |
## Basic usage |
| 43 |
|
| 44 |
The basic use of dotdrop is: |
| 45 |
|
| 46 |
* Import a file/directory to manage (this will copy the files from the filesystem to your `dotpath`): `dotdrop import <somefile>` |
| 47 |
* Install the dotfiles (this will *copy/link* them from your `dotpath` to the filesystem): `dotdrop install` |
| 48 |
|
| 49 |
Then if you happen to update the file/directory directly on the filesystem (add a new file/dir, edit content, etc.) you can use the `update` command to mirror back those changes in dotdrop. |
| 50 |
|
| 51 |
For more advanced uses: |
| 52 |
|
| 53 |
* `dotdrop --help` for the CLI usage. |
| 54 |
* [The usage doc](usage.md) |
| 55 |
* [The example](https://github.com/deadc0de6/dotdrop#getting-started) |
| 56 |
* [The howto](howto/howto.md) |