Replies: 3 comments 2 replies
-
Maybe you can write one and share it here?
Not sure how you want to do that. Maybe you want something like
Again, I am not sure how you want to do that. Could you figure it out and share the results here?
That would require some work on your part to identify what pieces are slow on WSL. |
Beta Was this translation helpful? Give feedback.
-
True, but it does provide fast access to the Linux filesystem. A "solution" could be to clone your repos inside your Linux HOME ?
Since the Windows drive is mounted in WSL, you could symlink your WSL |
Beta Was this translation helpful? Give feedback.
-
I recommend against working across system boundaries with WSL2, especially because of performance, but there are other issues. But still, if I happen to have my WSL2 terminal open and access a Git repository on the Windows filesystem, I have this in my WSL rc file:
Depending on your setup, git may run as part of your prompt. I override functions (for ZSH prompt) like __git_prompt_git and parse_git_dirty so that they don't use "command git" or "/usr/bin/git". Now I can use WSL git with acceptable performance on Windows filesystem, but it took quite some fiddling to get there. |
Beta Was this translation helpful? Give feedback.
-
WSL2 provides slow access to the Windows filesystem. This is particularly problematic when attempting to use git on largish repos. To combat this, you can install both git for windows and git on linux. That said, the user experience of this solution is not great. To use git for windows from WSL, you by default have to call it via
git.exe
. It would be more convenient if there was a dispatcher which could figure out which filesystem you were on and forward accordingly. Going further, it would be convenient if git for windows could use be set up to automatically use WSL vim, pagers, and rebase tools. Sharing a gitconfig file between versions would be nice as well. I would also like it if I could get a trimmed down version of git for windows which provides windows binaries only for those pieces which would be slow on WSL.Beta Was this translation helpful? Give feedback.
All reactions