简体   繁体   English

我需要同时为Windows 10和WSL安装Git吗?

[英]Do I need to install Git for both Windows 10 and WSL?

I'm trying to set up a web development environment using a guide on Medium . 我正在尝试使用Medium上指南来设置Web开发环境。 The author says we need to install Git for both Windows and for Windows Subsystem for Linux. 作者说,我们需要为Windows和Linux的Windows子系统都安装Git。 Git takes up a lot of space. Git占用大量空间。 Do we need to install it twice? 我们需要安装两次吗?

I have Visual Studio Code and Ubuntu (WSL). 我有Visual Studio Code和Ubuntu(WSL)。 I also installed Git for Windows 10. 我还为Windows 10安装了Git。

Git For Windows differs from the Linux Git . Windows 版GitLinux版Git有所不同。

So, if you want to execute commands in a Windows CMD and a Linux WSL shell, then yes, you would need to install both. 因此,如果要在Windows CMD Linux WSL Shell中执行命令,则可以,您需要同时安装两者。

On Windows side, that can mean simply uncompressing the self-extracting archive PortableGit-2.22.0-64-bit.7z.exe anywhere you want, and add it to your PATH. 在Windows方面,这可能意味着仅需解压缩自解压归档文件PortableGit-2.22.0-64-bit.7z.exe ,然后将其添加到PATH中即可。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM