arthurgleckler / replication

Git-based replication for use with Emacs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

replication.el

This is a nearly trivial Git-based replication system for Emacs.

I wrote it because, while I enjoyed using Google Drive and its ilk, I wanted something that ran only on my own machines, that provided all the benefits of Git for merging changes made offline, and that I controlled completely. And for hack value.

To use it:

  • Create the directory $USER/replicated/ on at least two different machines.
  • On machine A, run git init $USER/replicated.
  • On machine B, use git clone to clone A’s replicated/.
  • On each machine, make sure that replication.el is on your `load-path’.
  • On each machine, add this to your .emacs:
(require 'replication)
(setq replication-directory "~/replicated")
(add-hook 'after-save-hook 'replication-save-hook)

After that, editing an existing file in replicated/ on any of the machines will automatically cause the file to be committed to Git, after which git push will be run.

You’ll still have to run git pull to retrieve updates from other machines.

About

Git-based replication for use with Emacs

License:GNU General Public License v3.0


Languages

Language:Emacs Lisp 100.0%