[Development] Delete local DB on branch switch

just what i was thinking :smiley:

from uSync we can’t really delete databases or anything, but we can workout based on git if we should maybe re-import things.

so as an experiment:

GitHub - KevinJump/uSyncGitRules: [Experimental] - performing uSync imports based on the repo's status.

this writes the latest commit to disk every time you import (it foes into usync/git.meta, that file shouldn’t then be tracked by git)

then on startup, it checks git locally to see if there are any untracked things (e.g is the repo dirty) if its clean it then compares the latest commit in the git to the one on disk for the last import.

if they are different it runs an import.

this would mean imports run when you pull your repo down and run things.

it wouldn’t run an import when,
1). the local repo has any pending changes.
2) the last sync matches the last commit.

this could be extended to do other things - react to only merges track file changes in uSync folders etc. :person_shrugging:

Just thinking in code really - but interested to know if this type of thing would help.