简述 Git 在 Windows 和 Ubuntu 中的配置,以及对 Git 工作区域划分和 Git 中对于文件状态划分的理解。
git 基础安装与配置
基于 WSL 的 Ubuntu 下的 git
打开或关闭Windows功能 -> Hyper-V、Virtual Machine Platform、Windows Subsystem for Linux
# 1.必须运行 Windows 10 版本 2004 及更高版本(内部版本 19041 及更高版本)或 Windows 11
# 2.在管理员模式下打开 PowerShell 或 Windows 命令提示符
wsl --install
$ sudo apt-get install git # 安装 git
配置(设置用户名和邮箱)同下。
Windows系统下 git 配置
下载: