You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Nicolas Knoebber 711636219d Add acknowledgments for feeds and middleware 9 months ago
bin Reconfigure bin directorY 2 years ago
cli Change dotfile.IsClean to return true when dirty content is nil 11 months ago
cmd Fix bugs, clean code, add tests 11 months ago
db Add RSS feed of new files 10 months ago
docs Add acknowledgments for feeds and middleware 9 months ago
dotfile Change dotfile.IsClean to return true when dirty content is nil 11 months ago
dotfileclient Validate that config is set in CLI; improve errors in dotfileclient 1 year ago
local Change dotfile.IsClean to return true when dirty content is nil 11 months ago
server Add alias to title in commit view 10 months ago
usererror Change %#v to %q for formatting quotes in strings 1 year ago
.gitignore Add account recovery 1 year ago
.travis.yml Change target go version to 1.13 1 year ago
LICENSE Initial commit 2 years ago
Makefile Fix dotfile target 1 year ago
README.org Fix bugs, clean code, add tests 11 months ago
go.mod Add RSS feed of new files 10 months ago
go.sum Add RSS feed of new files 10 months ago

README.org

Dotfile

Dotfile is a version control system designed for dotfiles. It aliases file paths to short names and provides an interface to manage file state. Use a remote server like dotfilehub.com to push, pull, or find new files.

Why Dotfile?

Most existing solutions are built on some combination of git/stow/symlinks. This introduces the complexities and potential pitfalls of these tools. Git is designed for a directory of related files, whereas dotfiles are often scattered unrelated files.

Dotfile is a self contained system designed from the ground up to make managing single files as simple as possible. Files are stored in their normal locations on disk without any symbolic links. Dotfile doesn't care if tracked files are moved or edited with external tools.

Advantages over git based systems:

  • Not limited to one parent directory - initialize any file, even outside $HOME

  • No merge conflicts

  • Pull or push a single file instead of the entire repo

  • Revert a single file to a past revision without affecting other files

  • Easily rewrite or delete file history

  • Simple web interface for managing files remotely

Things Dotfile doesn't do:

  • File encryption

  • Manage non text files

  • Manage large files

  • Templates

  • Branches

Getting Started

  1. Install the CLI

  2. Create a Dotfilehub account to share files between machines

  3. Setup the CLI to use remote functions

Optionally self host a Dotfilehub instance.

Examples

Dotfile commands are like git but simplified.

Check a file in:

dotfile init ~/.bashrc

This creates an initial commit. Dotfile will store the path of the file and give it a default alias of bashrc. Use the alias to refer to it at anytime.

Open ~/.bashrc in $EDITOR:

dotfile edit bashrc

Check the diff after making changes:

dotfile diff bashrc

Commit new changes:

dotfile commit bashrc "Add dotfile alias"

View commit history:

dotfile log bashrc

Revert its uncommitted changes:

dotfile checkout bashrc

Push to a remote server:

dotfile push bashrc

Install all of your dotfiles:

dotfile pull --all

Contribute

Want to contribute? Open a pull request or an issue at github.com/knoebber/dotfile

Feedback is always appreciated - contact me at [email protected]