github.com/jpbruinsslot/dot@v0.0.0-20231229172555-797f05ba0642/README.md (about)

     1  Dot - simple dotfile manager
     2  ============================
     3  
     4  `dot` provides a cli application which will streamline the process of adding
     5  and removing files to and from your archive. Using `dot` in combination with a
     6  hosted repository you'll be able to backup, restore and sync your dotfiles for
     7  several machines. Why would you want your dotfiles hosted in a repository? For
     8  the answer and much more click [here](https://dotfiles.github.io). 
     9  
    10  `dot` works by placing a selected dotfile into the archive and symlinking it
    11  to its original location. The archive serves as a repository and can be
    12  persisted using a hosted git repository.
    13  
    14  Installation
    15  ------------
    16  
    17  #### Binary installation
    18  
    19  [Download](https://github.com/jpbruinsslot/dot/releases) a
    20  compatible binary for your system. For convenience, place `dot` in a
    21  directory where you can access it from the command line. Usually this is
    22  `/usr/local/bin`.
    23  
    24  ```bash
    25  $ mv dot /usr/local/bin
    26  ```
    27  
    28  #### Via Go
    29  
    30  If you want, you can also get `dot` via Go:
    31  
    32  ```bash
    33  $ go get -u github.com/jpbruinsslot/dot
    34  $ cd $GOPATH/src/github.com/jpbruinsslot/dot
    35  $ go install .
    36  ```
    37  
    38  Setting up
    39  ----------
    40  
    41  To begin using `dot` we need to create a folder in your home folder where we
    42  will track the dotfiles. And initializing a git repository.
    43  
    44  ```bash
    45  $ mkdir ~/.dotfiles
    46  $ git init
    47  ```
    48  
    49  Usage
    50  -----
    51  
    52  To start using `dot`, go to the newly created directory and issue the
    53  following command:
    54  
    55  ```bash
    56  $ dot sync
    57  ```
    58  
    59  This will initialize the necessary folder and create a `.dotconfig`
    60  configuration file which will automatically be tracked in the archive.
    61  
    62  #### Tracking files or folders
    63  
    64  You can use the following command to start tracking files or folders:
    65  
    66  ```bash
    67  # dot add -name [name] -path [path/to/file]
    68  $ dot add nvimrc /home/jpbruinsslot/.nvimrc
    69  ```
    70  
    71  To remove a file or folder for tracking, use the following command:
    72  
    73  ```bash
    74  # dot rm -name [name]
    75  $ dot rm -name nvimrc
    76  ```
    77  
    78  In order to automatically create a git commit message and push to the
    79  repository, pass in the `-push` flag. You can use this for both the
    80  `add` and `rm` command.
    81  
    82  ```bash
    83  $ dot add -name nvimrc -path /home/jpbruinsslot/.nvimrc -push
    84  $ dot rm -name nvimrc -push
    85  ```
    86  
    87  #### Additional machines
    88  
    89  So you've started tracking your files on one machine but now you want to use
    90  your archive on another machine. Clone your repository on the additional
    91  machine and use the `dot sync` command to start synchronizing your files on the
    92  new machine.