Hi, markus,
I took a deeper looker look at what you were doing -- I think i misunderstood you.
I'm able to reproduce what you're seeing. The issue is that its creating a table with an integer fid column - and they trying to put string-fids in it. That's an issue! I think this is an issue in the PostGIS GeoTools datastore (I havent looked in detail).
There isn't a lot of support for exporting machine-readable diffs - the QGIS plugin uses the web-api "export-diff" command to build a geopkg with the diff information in it. I'm not sure I'd recommend that as the best approach (its, also, not available via the CLI). We have been thinking of coming up with a "change set" file format to deal with this type of information.
The main issue with allowing people to update the PostGIS table is that you need to be able to track what change's they've made. You can do this with audit triggers on the database, or you can can do a brute-force diff using GeoGig to do a feature-by-feature compare to see what's changed.
Here's a change example,
PostGIS: in state A
import to GeoGig - in state A
Make change to PostGIS -- now in state B (A->B)
Make changes to GeoGig -- now in stage C (A->C)
Now, how do you reconcile this? There's lots of way to do it, but here's one;
a) create a branch in geogig, based on A
b) move PostGIS changes to the branch (A->B)
c) merge changes from geogig (A->C) onto the branch
d) create a diff and apply it to PostGIS
If there are conflicts, this gets a lot more complex. Also, if people are modifying the database while you are doing this maintenance you will mess things up.
There are other ways to do this (depending on your situation), but they are also quite complex...
Cheers,
Dave