• Stars
    star
    98
  • Rank 345,882 (Top 7 %)
  • Language
    Go
  • License
    GNU General Publi...
  • Created over 5 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Simple version control made for tracking single files

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.

Documentation

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 -f 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]