Smartgit : not a DIRC file error
Asked Answered
L

2

10

Today when I first tried to open a repository in Smartgit, it threw Executing a command failed "not a DIRC file" error. No idea what it means. I haven't done anything fancy besides pushing changes to bitbucket and now I cannot do that because it won't even open the repository.

How can I fix this?

Litchfield answered 22/4, 2017 at 8:50 Comment(6)
Be sure to back up your local changes (or better the entire repository), get rid of .git/index and in in your repository root run git reset --hard. – Willawillabella
I just got this after a power outage :( – Gorgias
@endolith, same πŸ™ – Floweret
Deleting .git/index and running git reset --hard did NOT work for me. – Ludie
I have fixed same issue with SmartGit 21.2.4 by deleting ./git/index file, open SmartGit software myProject project, checkout to other branch(develop or master) and run pull command, checkout to same branch and merge changes from other branch(develop or master). – Consolation
I just got this after a blue screen :( – Mistrust
P
1

You can fix this by deleting the /.git/index file in your repo and then running git reset in cmd in the repo root directory. It'll take 5+ minutes to perform as it rescans the entire repo. Any uncommitted changed files should survive this but if any of the above doesn't work use git reset --hard which will destroy any uncommitted files.

Piscator answered 30/10, 2023 at 10:17 Comment(0)
C
0

I just had this - was a submodule that the reference too had become corrupted and it wasn't displaying as an existing submodule at all in SmartGit.

I deleted the submodule folder in the explorer, SmartGit then showed it as deleted, I then reset that submodule it to pull it down again, checked out a proper branch to fix it being a detached head and from there everything worked.

Calvillo answered 25/10, 2023 at 19:31 Comment(0)

© 2022 - 2024 β€” McMap. All rights reserved.