It does this by listening to events fired by Statamic when content, entries, assets, settings, or users are added, changed, or deleted, and then runs git commit and push commands automatically.
In fact, you can configure Spock to do just about anything you'd like via the command line when content changes. Want to run
rsync? Node tasks? Call an external API? Reboot an external service? No problem.