For GitHub + Dropbox + Git:
If your priority is worktree syncing between your own machines:
I solved my problem by forcing Dropbox to ignore my .git subfolders.
That syncs my personal worktrees, while leaving github alone. Be careful about how it works though, and only do it only for your own account (e.g. your own PC and your own laptop). I simply have to re-pull from my other machine (directly from github) when I push from one machine, to make sure that the git data is in sync with each other.
It behaves as if you copied over the files manually via thumbdrive (excluding .git), so make sure you re-pull git everytime you switch machines. And always remember to switch branches on both machines manually, every time you switch branches.
Instructions for Windows (run in PowerShell):
Set-Content -Path 'C:\path-to-project-inside-dropbox\.git' -Stream com.dropbox.ignored -Value 1
Instructions for Mac:
xattr -w com.dropbox.ignored 1 /path-to-project-inside-dropbox/.git
Instructions for Linux:
attr -s com.dropbox.ignored -V 1 /path-to-project-inside-dropbox/.git
It's convenient when you have a lot of data/logs/object files/etc (anything big in .gitignore but you let sync in Dropbox, as LAN sync is fast enough to sync the big stuff).
Dropbox syncing all the data and object files allows faster compiles of larger projects on both owned machines after minor modifications (for same-OS x64), and easier comparative testing on the other machine.
And keeps github unpolluted.
This is better than the selective sync system because of all the automatic "selective sync conflicts". This method forces Dropbox to completely ignore everything in specific subfolders, as if it didn't exist.
And if you mess up, you also have a double backup of github and Dropbox to rewind to (both have separate convenient recovery use cases, like resurrecting specific logfiles).