Whats is Dotfm?
Dotfm is a simple config file manager, which uses git as it's backend to manage and track dotfiles.
Installation
Download binary
Using cURL
$ curl -L https://git.io/JfQTV -o dotfm
Using wget
$ wget -O dotfm https://git.io/JfQTV
Note: Make sure to add this binary to your $PATH
otherwise you won't be able to access it globally.
Build from source
Note: Make sure you have go
installed.
- Clone this repository
cd
into the downloaded repository and rungo build
.
Usage
Initialize
$ dotfm init
This will initialize the dotfm
repository in $HOME/.dotfm
Clone
Download an existing dotfm repository or use dotfm to track a non dotfm repository.
$ dotfm clone <url>
Track
This adds a file to the dotfm tracker.
$ dotfm track /path/to/file
List
Lists tracked files.
$ dotfm list
Status
Shows the status of the repository.
$ dotfm status
Stage
Stage files to be commited.
$ dotfm add <filename>
Commit
Commit your changes.
$ dotfm commit
This will open your get editor.
Remote
Add
Add a new Remote.
$ dotfm remote add <remote name> <url>
Remove
Remove an existing Remote.
$ dotfm remote remove <remote name>
List
List remotes.
$ dotfm remote list
Push
Push local changes to remote repository.
$ dotfm push <remote name> <branch>
Example:
$ dotfm push origin master
Sync
Sync local repository with remote.
$ dotfm sync <remote name> <branch>
Example:
$ dotfm sync origin master
Environments
Environments are nothing but git branches but they can be very powerful. You can create different environments for different machines and use them accordingly.
Create an Environment
$ dotfm env create <env name>
List Environments
$ dotfm env list
Switch to an Environment
$ dotfm env switch <env name>
Delete an Environment
$ dotfm env delete <env name>