In my application, users have text files that are kept in sync and versioned using Git. Whenever the user starts a session, my application clones their repo, and when the user signs out, my application commits and pushes their changes, all under the hood.
I am now interested in giving users the ability to sync their files with their Dropbox account. For example, whenever they make a change to a file in my application, that change should be synced to Dropbox. Likewise, if they were to change a file in Dropbox, that change should end up as a commit in my Git server.
For Git --> Dropbox, I can easily enough set up a hook that automatically uploads changes to Dropbox whenever there is a Git commit.
How could I implement Dropbox --> Git? Is there a solution that's better than polling the Dropbox API for changes at a set interval or user action? Is there some other way I can implement bidirectional file transfer between Dropbox and Git?