5

I'm brand-new to Emacs and I want to put my ~/.emacs.d under version control, much like I've done in the past with my vim setup. I installed a couple packages before initializing a git repo, and now I'm sifting through the contents of emacs.d trying to figure out what came from where, and what I should add to my gitignore.

The folder contents are currently

auto-save-list/
elpa/
url/

I've added auto-save-list to my gitignore, but I'm less clear about the elpa and url directories. I gather elpa houses the packages I've installed, but I'm not sure whether I should put those under version control, and I have no idea what the url directory is about.

Any help/advice to a noob would be much appreciated.

ivan
  • 1,928
  • 10
  • 20
  • 2
    If you reprhase this to be about the role of the `url/` directory, then the question will no longer be a duplicate. – Andrew Swann Jun 08 '15 at 06:57

2 Answers2

10

There are lots of different ways to organize your .emacs.d. You should probably have a look at some of the great examples here and here.

Most of the time, what you want to keep under version control is your personal emacs configuration: the elisp files and directories you edit and modify to personalize your emacs.

Under my .emacs.d/, for example, I have an init.el file and the lisp/ & elisp/ directories (elisp configuration/customization files etc). Those are the only things I keep under version control.

Based on my tiny experience, I've never found a good reason to keep those autogenerated directories under version control.

Nsukami _
  • 6,341
  • 2
  • 22
  • 35
2

Since I also wanted to sync the same emacs.d folder to several other machines that I normally use (desktops, laptops, home, work, etc.), I kept the whole emacs.d folder under git when starting out. As I implemented various customizations, I started expanding .gitignore to selectively exclude unwanted sub-folders of the .emacs.d folder. This approach allowed me to customize which folders got version control as my .emacs.d folder has several development folders, test folders, and so on. Not all folders need to be under version control, but you won't know which ones until you figure out your use case. Hope this helps.

Emacs User
  • 5,553
  • 18
  • 48