Here is my short answer (there is a longer answer below, and since the answer as a whole is kind of long, if I forgot to address something or you have further questions let me know, and I will try to include them):
- I can't see any major problems with pushing your entire .emacs.d to dropbox or github, but I think there is a better solution which I will explain below.
- AFAIK there is no sensitive personal information that is stored in that directory by default, but it would depend on what you personally put in there. If you want to e.g., store password and other sensitive information that you need emacs to have access to, you can put it in a separate file which emacs loads explicitly from your init file, but which you do not track in github (here is an example of that).
- Packages are usually stored in a sub-directory within your .emacs.d, so you should be able to sync everything together, but again, see solution below for details.
- I will defer answering this question until below.
Here is my more involved answer:
From you questions, I assume that you are interested in 1. syncing your setup, and 2. tracking changes in your setup with version control. I had these same requirements for my setup, and my final solution (though I have used a combination over the last few months) is to use github alone, which will allow you to sync (albeit not necessarily automatically) and track changes.
My initial setup was to sync only my
init.el file through dropbox and symlink it to my
.emacs.d. Since I use
use-package it was not necessary to sync anything else, because almost all my packages are installed from
use-package will automatically download any missing packages automatically on any machine I sync the config to. This approach worked fine, but with dropbox there is always the risk of sync conflicts, and if your files are not under source control, it can be a pain to resolve the conflicts.
This problem is solved by simply pushing my entire
.emacs.d to github. Then all I have to do is clone the repository on a new machine, push if I make changes, and pull if I made changes elsewhere. I do most of this through
magit. This way, if there are any conflicts, I can easily solve them through git-related tools.
I still don't sync my packages; again, because of
use-package it is not necessary. I do however sync a sub-directory
~/.emacs.d/elisp where I put any elisp code that I got from somewhere other than
If you would like to see how my setup works, you can take a look on github. Just keep in mind that I don't claim to know the best way, this is just the way that has worked best for me so far. Also, most of my actual configuration is in an org file to make it more manageable.
I am currently syncing this emacs setup between two home computers and my work computer, and have never experienced any issues with it.
Also, I see no problem using just dropbox, or a combination of dropbox and github similar to what you suggested, but I prefer my way for the reasons I explained above. You should experiment to find what is best for you, but I personally think it is import to have your emacs config under source control, so it is a good idea to have git as part of the equation, even if you don't push it to github. Dropbox and git together without github would also mean that you don't have to worry so much about personal information in your
.emacs, but I don't think this is a major issue in general anyway.