Syncthing has awesome docs - start there if you haven't read them already. This is just a recipe to show how I set it up to have a git-versioned backup on Raspberry Pi.
Once machines are talking to each other via Syncthing add the folder through GUI, share it with another device, switch to that device and accept the incoming folder.
Let's say that the folder is ~/org
.
On the 'backup' device in Syncthing GUI, go to Folder settings > File Versioning, choose "External File Versioning" and in Command input fill in: git-backup-org %FOLDER_PATH% %FILE_PATH%
.
On the 'backup' device create the backup folder and initialize a git repository: