-
-
Notifications
You must be signed in to change notification settings - Fork 620
Description
Hi, I'm new to dolt and evaluating it for our use case.
I was working on quite a large number of changes in my local dolt, then I realised I was on main and wanted to create a branch to work on, but got this error.
❯dolt checkout -b add_history
The current directory is not a valid dolt repository.
run: dolt init before trying to run this commandThis error happened every time I tried to create a new branch like this, but dolt status showed my untracked changes, and dolt sql allowed making changes to the DB:
❯dolt status
On branch main
Your branch is up to date with 'origin/main'.
Changes not staged for commit:
(use "dolt add <table>" to update what will be committed)
(use "dolt checkout <table>" to discard changes in working directory)
deleted: entries
Untracked tables:
(use "dolt add <table>" to include in what will be committed)
Eventually I thought maybe that dolt init would fix the issue as it was telling me to do it, and I figured it wouldn't wipe my local repo, but ...
❯dolt init
Successfully initialized dolt data repository.
❯dolt status
On branch main
nothing to commit, working tree cleanSo something strange is going on here, I would expect all dolt commands to consistently be able to tell if there is a dolt repo initialised, or report that the repo is corrupt somehow. And dolt init probably shouldn't wipe out an existing repo without confirmation.