Live data from Hacker News

WSL2 corrupting Git repositories and shell history

github.com

111–120 of 423 posts

Re: WSL2 corrupting Git repositories and shell history

#112

> Feel like booting Linux on a separate disk because of these issues. It always seemed strange to me that people would rather use WSL than the real thing when Windows doesn't bring much advantage. What am I missing ?

A lot of people out there don't get to choose their workstation OS. Their only options are a linux VM in virtualbox, or a linux VM in WSL2.

Re: WSL2 corrupting Git repositories and shell history

#113
post #3

I don't really understand the use case for WSL. What are the advantages? You could run a full Linux VM and do everything on it on any machine these days. Which is what I do, but I'm just an old school hack. Anyone who uses WSL care to enlighten me? Thanks!

I use a mix of WSL2, and VMs. WSL2 has a few nice properties for some use cases: a) It comes default with some network binding magic (ok, just configuration) that makes your WSL env almost actually behave like localhost. I know you can configure this yourself, but it's nice out of the box. (on the other hand, sometimes is this exactly the opposite of what you want...) b) My main machine is a bit RAM constrained, and…

Have you tried WSL1? It sounds like it might fit your use cases better:

- WSL1 shares the same network interfaces and addresses as the host, no proxying like WSL2

- Significantly less RAM usage

- No time sync bug

Re: WSL2 corrupting Git repositories and shell history

#114

> Feel like booting Linux on a separate disk because of these issues. It always seemed strange to me that people would rather use WSL than the real thing when Windows doesn't bring much advantage. What am I missing ?

A lot of people out there don't get to choose their workstation OS. Their only options are a linux VM in virtualbox, or a linux VM in WSL2.

This is it for me. We're a 'windows shop'. I think only the IT guy is happy about that.

Re: WSL2 corrupting Git repositories and shell history

#116

> Feel like booting Linux on a separate disk because of these issues. It always seemed strange to me that people would rather use WSL than the real thing when Windows doesn't bring much advantage. What am I missing ?

WSL1 was loads convenient back in the day. All you had to do was pop open a terminal instance and you'd have access to authentic GNU tooling, on any Windows PC. I use Linux full-time now, but I have several friends who use Windows, and almost all of them have WSL installed.

Re: WSL2 corrupting Git repositories and shell history

#117

> Feel like booting Linux on a separate disk because of these issues. It always seemed strange to me that people would rather use WSL than the real thing when Windows doesn't bring much advantage. What am I missing ?

> It always seemed strange to me that people would rather use WSL than the real thing when Windows doesn't bring much advantage. Windows brings lots of advantage to some things (including interfacing with the large number of people who rely on people having software that works only or best on Windows; in anything other than very tech-focussed firms this probably includes your employer, and even in such firms it often…

being able to play video games and alt tab into writing and testing code during queue times is huge for me

Re: WSL2 corrupting Git repositories and shell history

#118

Earlier quoted context omitted.

Enabling hardware virtualisation opens up a significant and deep attack surface. Considering the vanishingly small percentage of users which benefit from it, I hope it stays off by default.

Windows is moving to a model where Windows itself is run as a virtualized OS. I believe this is enabled by default in new installs. So having a Linux VM in Hyper-V isn't opening up much new attack surface.

First I hear of this. Source? Googling for this predictably returned unhelpful results.

Re: WSL2 corrupting Git repositories and shell history

#119
post #104

Earlier quoted context omitted.

You are missing Office, Outlook, Visual Studio, and any enterprise nonsense IT requires on company computers. All of that requires Windows.

The web version of Outlook has come a long way, and in my opinion has become the superior product (for my use cases, at least).

You’re also missing Adobe products as well as most games.

Using Linux without a reboot is an incredible convenience. Glossing over the value of proprietary software that only runs on Windows is narrow minded.

Re: WSL2 corrupting Git repositories and shell history

#120
While using Visual Studio (not code) with git in wsl2 with Ubuntu 20.04, I saved three open files with changes, committed shutdown the laptop. On next start files showed as empty 0 bytes in Visual Studio and thought as far as I recall were non-zero size in wls2. No way to recover them from git. I stopped using git repos in wls2 for now.
Post reply on HN