Keeping local & remote sheets in sync?
beckyjackson opened this issue · 3 comments
Example:
- user updates remote sheet
- user updates local sheet with something else
- user pushes local changes & unintentionally overwrites remote changes
We could put a check in place when pushing and pulling that there are no out-of-sync changes (akin to git merge conflicts), but I'm not sure the best way to implement this. If you don't fetch
before push
, you wouldn't see the remote changes.
I also think this gets really messy when trying to figure out if pull
should be overwriting local changes, unless we were to store a third intermediate copy of the sheet...? (I'm kind of thinking out loud here)
Maybe this is too complicated for our use case, and we just warn users in the docs that if they don't push/pull after changes, some changes may be overwritten?
Also, if you run fetch
to get remote changes, but run push
before running pull
, the remote changes will also be overwritten.
Yes. For now, it's enough to check and warn on destructive changes.
I think status
(#35) will help with this as well. I tried to make it so that any combination of changes could be found (e.g., removed remotely but still exists locally...).