Knowing that windows processes editing the home folder for files exposed in WSL is not supported right now (VolFS metadata sync issues, google it)
If you are referring to this issue or a derivative of it, then note that the problem was solved a long time ago (as noted in that Microsoft blog post) with the creation of a DrvFs access method for WSL. From Git Bash, you would use:
cd //wsl\$/Ubuntu-18.04
# Substitute proper distro name if needed
I definitely don't recommend "moving" either home folder (i.e. attempting to use either system's folder as the other's home), personally. You are likely to run into permission/ownership issues, different UID/GIDs, etc. "Syncing" the two instead would be a much better strategy, IMHO.
However, this question has come up in the past, and the general recommendation is to use a git repository for storing/syncing your shared configuration files between "hosts" (WSL/Ubuntu and Git Bash in this case). There are a number of utilities designed to make this easier, with a nice list here. I have not personally used any of them, but I've read good things about GNU Stow.
Note: From your profile, it sounds like you have far more expertise in git than I do, but it seems to me that (if desired) you could create a hook so that whenever you pushed a changed to the config repo on the Git Bash side, it automatically would run something like:
wsl -e sh -c "git --git-dir=$HOME/.dotfiles pull
This uses the wsl
command in Windows to call a command in your Ubuntu instance. You'd need some way to only run the hook when you committed from Git Bash, though. Or you might be able to script it such that it called git
in Git Bash if the commit was done in WSL/Ubuntu, and vice-versa.
Or that might be overkill/over-architecure ;-)