user@windows:~/gitbash.cc-guide (main) $ git log --oneline -1 # 持续更新 2026-11
COMMIT / 提交 · MANUAL

Git Bash 使用手册 - 终端操作与Git工作流详解

commit-01

窗口与路径规则

Git Bash 窗口是 mintty 终端:选中即复制(或右键粘贴,见怎么粘贴)、滚轮翻历史、Ctrl+加减号调字号。路径规则:/c/Users/你 对应 C:\Users\你——bash 用正斜杠与 Unix 风格,盘符挂在 /c /d 下,敲命令时两种写法 Git Bash 都能识别。

commit-02

命令结构:bash 命令与 Git 命令

终端里敲的命令分两类:① bash 命令(cd/ls/mkdir/cp/rm)管文件与目录;② Git 命令(git add/commit/push)管版本库。新手最常把两者混在一起背——分开记:命令速查按场景分组。命令的帮助:任何 Git 命令加 --help 打开本地文档。

commit-03

日常工作流

# 修改文件后的标准循环
user@windows:~/repo $ git status
user@windows:~/repo $ git add .
user@windows:~/repo $ git commit -m "说明本次改动"
user@windows:~/repo $ git push

status → add → commit → push 四步循环覆盖日常八成场景;冲突处理与分支操作见使用教程。配置细节(user.name/email、别名)见安装教程第 2 步。