With this #recipe you can regularly commit and push to git, to keep your repo in always synched. You can also easily manipulate the git history to reduce clutter.
Click on the extension link above to see how to use it.
For Foam specific needs, you can add a comment here by following the [[contribution-guide]]