Switch branches even if some files are locked by IDE
When working on a repository that's open in VS Code, GitKraken is often unable to switch between branches, reporting that it couldn't delete some directory. This occurs even when there are no changes between the branches that require deleting directories. `git checkout` is always able to switch branches in these cases.
Comments: 19
-
11 Aug, '21
TheAndreyI have the same issue: GitKraken doesn't unlock files after close repository tab. I have to close application, to fix this.
-
13 Aug, '21
CameronYes please! This is a bug with the underlying open source git libraries that gitkraken is using- to switch branches it tries to delete the entire repository and reload it. I have to go to the command line or other tools like TortoiseGit to do almost anything now, it makes the product nearly unusable. Please fix this!
1 -
22 Feb, '22
RHU MergedGitKraken fails checking out a branch when files are in a soft lock by another process.
Suggestion idea taken from Glenn at: https://stackoverflow.com/a/67022547. -
29 Nov, '22
MorasiuSame here.
-
02 Feb, '23
VladSame here. Please fix!
-
06 Feb, '23
VladHappens for me as well. I use Visual Studio 2022.
1
Makes GitKraken almost unusable. Unacceptable for a paid product. Please, this is an urgent fix! -
16 Feb, '23
MattThis issue seems to have started for me when I upgraded recently to Windows 11, Visual Studio 2019. I run into this issue multiple times per day. I only thought to complain now because it's fine, but still annoying, if I close Visual Studio and VSCode. I bet there are many more silent users suffering with this problem.
1 -
27 Feb, '23
AlexHow is it possible this is still not fixed. Most of the functionality does not work right now if you have an IDE open, like rebasing switching branches even simple commits.
Please fix this ASAP else I need to go back to SourceTree again because this tool is barely usable -
15 Mar, '23
Tony SteccaHi GitKraken. I agree with the comments above. This happens to me frequently. It would be nice to see it fixed.
-
26 Apr, '23
EvanThis used to happen occasionally for me, but rebooting the IDE would fix the issue. Recently I got a new laptop, and now one project I can never change branches without shutting down the IDE first.
-
26 Apr, '23
Joey Kelroy Admin"Allow branch change when files are used by other programs" (suggested by RHU on 2022-02-22), including upvotes (6) and comments (0), was merged into this suggestion.
-
02 Aug, '23
RHUWould option "Use Git Executable" help with this?
-
16 Aug, '23
RomanCan't come soon enough. Happens ALL the time. "git checkout" works flawlessly every single time GitKraken complains about locked files. "Use Git Executable" doesn't help, I guess its scope doesn't currently include switching branches.
-
09 Sep, '23
JanWell this is fine issue for fist ten minutes of Trial period. I have opened my project in VS Code, run Gitkraken, try to checkout some branch (as you see, switching branches seems to me like basic use case for git) and I just see error message "could not rmdir". Lovely. It's working when I close VS Code but I primarily work in IDE, not in Gitkraken and closing the IDE everytime I need to work with git is not nice feature.
-
05 Jan
GigiFix: for me, it was caused by the built-in terminal of vs code. if you have a branch where you made changes in one of the directories within your project which is accessed by the built-in terminal, Gitkraken can't perform checkout. try closing terminals and then checkout.
-
15 Feb
ByronThis is super annoying that it's still happening. I often switch between branches and if using GitKraken I have to force close both VSCOde and Visual Studio. I have no issues checking out a new branch with the CLI.
-
20 Feb
PrzemekAny solutions for that issue?
-
21 Feb
Joey Kelroy Admin"Error while checking out, could not rmdir." (suggested by <Hidden> on 2024-02-20), including upvotes (1) and comments (0), was merged into this suggestion.
-
24 Feb
LIs this issue really fixable in every case? It sounds like a Windows problem due to their file system, by design. Or a problem with the IDE/tool keeping the file or folder open. What can GK do about a file locked by another process? I guess this is one of the reasons Linux has become so popular for developers.