I have a Mac, and two Ubuntu computers, and commands in a .bash_aliases file I want synchronised between the three. Steps as follows:

  1. Put .bash_aliases in a magically synchronised location (Dropbox, G Drive, whatever tickles your fancy). I'm using G Drive, and Insync to move the data around.
  2. Sync your master .bash_aliases to your computer.
  3. Create a symlink from ~/.bash_aliases to the automatically-updated .bash_aliases.
  4. If you're using macOS, edit your .bash_profile to have the line
    source ~/.bash_aliases

I tried to get this to work with ResilioSync first, but ran into a stack of permissions issues that I got bored of trying to resolve, hence Insync and G Drive.