11. Git 版本控制

本章共 2 篇详细教程(含 .msi / .exe 一键安装步骤),建议按顺序完成。安装包见「开发工具」各项目页网盘。

1. Git 安装(.exe 向导,可一路默认)

官网下载:https://git-scm.com/download/win

  1. 双击 Git for Windows 安装包。
  2. 大部分选项保持默认即可;编辑器可选 VS Code 或 Vim。
  3. PATH 环境选推荐项「Git from the command line and also from 3rd-party software」。
  4. 装完新开 CMD:git --version。
  5. 首次配置:
git config --global user.name "你的名字"
git config --global user.email "你的邮箱"

2. 毕设常用 Git 命令

git clone 仓库地址
git status
git add .
git commit -m "说明"
git pull
git push

IDEA / VS Code 左侧也有图形化 Git,效果相同,新手可先用图形界面。