Backing up your Raspberry Pi code using rsync

This is how I develop code on my Raspberry Pi: ssh into the Pi from my Macbook Pro from 2 Terminals, and use emacs on one to edit the code, while I run the code from the other. This way I don’t need to use the annoyingly slow X-server or