Source control is a way to precicely manage the history and content of a directory of files. Often used for program code, this feature is very useful for note taking as well.
There are (too) many ways to commit your changes to source control:
Git: Commit All
command after editing files. The default Foam workspace settings will stage & sync all of your changes to the remote: