git merge 命令参数详解(Git 使用教程 21)

git merge 把分支改动整合进当前分支。本文解说 --no-ff/--ff-only/--squash、-m/--no-edit、--abort/--continue、-s/-X 等参数,附历史形状对照表与冲突处理流程。

git merge 命令参数详解(Git 使用教程 21)

git checkout 命令参数详解(Git 使用教程 20)

git checkout 曾同时负责切分支与恢复文件,现已被 switch/restore 拆分。本文按用途解说 -b/-B/--detach/--orphan/--ours/--theirs/-- 等参数,附新旧写法对照与同名陷阱。

git checkout 命令参数详解(Git 使用教程 20)

git switch 命令参数详解(Git 使用教程 19)

git switch 专职切换分支。本文解说 -c/-C、--detach、-、--guess/-t、-m、--orphan 等参数,附新旧写法对照表与本地有改动时的处理。

git switch 命令参数详解(Git 使用教程 19)

git branch 命令参数详解(Git 使用教程 18)

git branch 管理分支指针。本文解说 -a/-r/-d/-D/-m/-v/-vv/--show-current/--merged/--no-merged/-u/--sort 等参数,附安全清理分支与改名的流程。

git branch 命令参数详解(Git 使用教程 18)

git mv 命令参数详解(Git 使用教程 17)

git mv 移动或重命名文件并写入暂存区。本文解说 -f、-n、-v、-k 等参数,附大小写重命名、--follow 跟踪历史与拆分提交的建议。

git mv 命令参数详解(Git 使用教程 17)

git rm 命令参数详解(Git 使用教程 16)

git rm 删除文件并写入暂存区。本文解说 --cached、-r、-f、-n、--ignore-unmatch、--pathspec-from-file 等参数,附配合 .gitignore 清理误提交文件的流程。

git rm 命令参数详解(Git 使用教程 16)

git clean 命令参数详解(Git 使用教程 15)

git clean 删除未跟踪的文件与目录。本文解说 -n/-f/-d/-x/-X/-i/-e 等参数,附三种删除范围对照表与「先预演再执行」的安全流程。

git clean 命令参数详解(Git 使用教程 15)

git revert 命令参数详解(Git 使用教程 14)

git revert 用新建反向提交的方式撤销已公开改动。本文解说 -n/--no-commit、--no-edit、-m/--mainline、--continue/--abort/--skip 等参数,附与 reset 的选型对照。

git revert 命令参数详解(Git 使用教程 14)

git reset 命令参数详解(Git 使用教程 13)

git reset 移动 HEAD 并按模式重置暂存区与工作区。本文解说 --soft/--mixed/--hard/--merge/--keep、-p、-N、带路径写法,附三模式对照表与安全操作流程。

git reset 命令参数详解(Git 使用教程 13)

git restore 命令参数详解(Git 使用教程 12)

git restore 恢复工作区或暂存区文件。本文逐项解说 --staged/-S、--worktree/-W、--source/-s、-p、--ours/--theirs、--merge、--overlay 等参数,附作用位置对照表。

git restore 命令参数详解(Git 使用教程 12)