core: prevent sessions from disappearing after git init
Previously, sessions created in a non-git directory would disappear from
the session picker after running git init and making the first commit.
This happened because the migration logic ran prematurely before a stable
project ID existed.