Since you're using git and a git-server like GitHub or GitLab anyways (you are, right?!), let barely commit & push your changes after every rebuild or live session, if you choose the backup
or both
option in the exit menu.
The plugin is enabled by default.
Note: git has to be installed on your system. GitHub Desktop is not sufficient.
read full documentation