GitKraken checking out a branch fails and deleted file(s) on Windows

Viewed 352

Sometimes when trying to switch branches in GitKraken it will fail to checkout and come back with one or more files being deleted.

enter image description here

From here one can recover the files by discarding the changes. But one still can't checkout the branch. Even stashing the deleted files won't allow the checkout to proceed.

A workaround is to go to Git Bash. Git Bash has no trouble checking out the same branch that GitKraken has trouble with.

enter image description here

Does anyone know why GitKraken does this? Does anyone know a way GitKraken can handle these checkouts without needing to resort to using Git Bash?

1 Answers

OK, after a very helpful support Zoom with Axosoft was able to find out a bit more.

This is primarily due to files being in use. GitKraken uses libgit2 and another npm library to monitor when files change in a repository. The programmer at Axosoft showed that we could avoid the problem also by comprehensively closing other applications like Docker Desktop and Visual Studio. These programs can place soft locks on the file that GitKraken has trouble navigating.

...Git Bash doesn't have a problem with the soft file locks and can switch the branch without problems.

So we now have two workarounds but still no fix yet. Would be great if GitKraken could resolve this bug, or maybe add a feature where we can easily open a Git Bash prompt to the repository. ...The Git Bash workaround is generally less of a hassle than having to close multiple applications when needing to checkout a branch.

Related