There is a plethora of possibilities on how to perform this. A common way that i saw people using since a long time ago was to build a script that just
tar's all their configuration; then they just download the
tar file and unpack. It could involve a file called
myconf with a content like:
Then you run
tar -czvf myconf.tgz -T myconf
Download on the other machine and unpack.
The issue with this approach has always been completeness of the files. For example: you worked on machine A and there you created your
.vimrc, next you worked on machine B (to which you copied your configuration) and updated
.vimrc. When you got back to machine A you needed to copy the configuration from machine B. A mess resulted once dozens of machines were involved.
I saw NFS mounts used for this purpose as well. Either by holding the entire
/home directories or by holding the configuration files to which users made soft links.
The NFS mount works much better than
taring and copying things but has its own problems: If you need to work on machines on which you do not have root access, mounting is not an option. Moreover, creating NFS mounts over the internet might prove to be slow.
github (or bitbucket, or gitlab)
This one is my favourite. Since the raise of free and easily available source code repositories people kept finding new ways to use
VCSs. You can use a code versioning system as a holder for configuration files.
Build a repository holding your configuration scripts and
git clone (or
svn, whatever you like the most) on the machines you use. You can commit and push back to the repository when you update your configuration and sync it on the other machines when you switch to them.
On the other hand, this option does not come without its own set of issues:
Do not create a source repository directly in your home directory, several
VCSs do not like to have source trees inside other source trees. Create an extra directory in your home to hold the repository (a good name for it might be
rc), and soft link the files you need (e.g.
ln -s rc/.vimrc ~/.vimrc).
Never submit API keys or other data that should be private into a public source repository. Github sends you an email warning if you push something that looks like an API key, which probably is a good measure of how often it happens on github repositories.