I linked a database to source control which seemed to work without error. However, when I attempt to refresh the list of changes, I receive a git error.
Comments
13 comments
-
Do you by any chance have any of the files open/selected/locked in any other programs? (E.g. file explorer/text editor).
Do you have full access to the filesystem where your git repo is located? -
Yes I have full access. I'm linking the database to an empty subdirectory. I already have another database linked to the same repository in a different directory and that one works fine.
-
Have you tried deleting the local repo and pulling down a fresh clone?
(Obviously commit and push or otherwise save any local updates/commits before deleting the local repo to avoid losing work.) -
I cloned the repo again to a different directory, unlinked the db and linked it again with the new path. Now it works - but the entire DB is showing up as a change. I'm guessing something went wrong when I first linked it?Just noticed when i tried to delete the original repo, I'm getting an error. Looks like something is holding a file lock. Maybe that was the issue.
-
Is there a redgate.ssc file at the exact path you committed to?
Does the code in the repo match the code in the DB? -
Yes there is a redgate.ssc file. It is the same one from when I first linked this database and I have not made any changes to it because of the issues discussed in this thread.
-
So the entire DB is showing as a change... What sort of change? New objects? Modified objects? Deleted objects?
I'm assuming you were expecting them to be in sync? -
I tried renaming my new cloned folder and then relinking the same database again to the new path. I received the same error about not being able to execute git clean.Does SQL Source Control support multiple databases in the same git repository?
-
It should do. Most of my clients use Git repos that contain multiple DBs.
Have you tried opening a command prompt to the DB directory and running a git status and a git clean?
Does that give you any more feedback or provide any unexpected surprises? -
I can run git clean without any issues from both the directory that I linked to and the root of the repository.
-
After running git clean, did your issues persist? (I'm assuming so).
At this point I think I'm out of suggestions. I suspect it's one for Redgate tech support. Good luck! -
Sorry to bring up an old thread, but I see nothing newer. Was there any resolution to this? I am experiencing this same exact issue.
-
I do not recall what finally resolved this issue for me but at some point it stopped being a problem. Sorry I can't offer more info.
Add comment
Please sign in to leave a comment.