Maintaining a .emacs file
Since I run Windows with Ubuntu in a virtual machine, and also use lab computers and also use my fiancee's computer, etc., I wanted to have a way to manage my Emacs configuration without doing any direct computer to computer file copying, or worrisome flash drive couriering. (I imagine such situations happening: oh save me God, my .emacs file just fell down that street drain...)
Instead, I've decided to maintain my .emacs and ~/elisp/ with git.
Here's what I did, let me know if you have any suggestions to do it better:
(For the curious, yes I did use gvim to convert the above script to html. Does Emacs do that? I never looked.)
After I got the links set up, I committed to a GitHub repo. Useful to have a repo I know will be around when I need it. I'd rather not host this on my own web server, for convenience of configuration sake.
Add the files to the repo, and push to master:
And there we go: I can get a copy of my emacs configuration where ever I go. One of the benefits of git is that even if I don't have an internet connection, I can still safely update my .emacs file with revision history, then push it back to GitHub when I find a connection again.
Instead, I've decided to maintain my .emacs and ~/elisp/ with git.
Here's what I did, let me know if you have any suggestions to do it better:
# create the repo (I don't mind it being in my home dir):
git init
touch README # only since I'm using GitHub for my repo
git init
touch README # only since I'm using GitHub for my repo
(For the curious, yes I did use gvim to convert the above script to html. Does Emacs do that? I never looked.)
After I got the links set up, I committed to a GitHub repo. Useful to have a repo I know will be around when I need it. I'd rather not host this on my own web server, for convenience of configuration sake.
Add the files to the repo, and push to master:
git remote add origin git@github.com:bluepojo/bluepojo.emacs.git
git add *
git add elisp/*
git commit -m "Initial Commit"
git push origin master
git add *
git add elisp/*
git commit -m "Initial Commit"
git push origin master
And there we go: I can get a copy of my emacs configuration where ever I go. One of the benefits of git is that even if I don't have an internet connection, I can still safely update my .emacs file with revision history, then push it back to GitHub when I find a connection again.

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home