Git 命令参考手册
本手册包含所有 Git 命令的详细说明和用法,是 Pro Git 中文版的补充参考。
常用命令
仓库操作
- git-init - 创建空 Git 仓库
- git-clone - 克隆仓库到新目录
- git-config - 获取和设置仓库或全局选项
基本操作
- git-add - 将文件内容添加到索引
- git-commit - 记录对仓库的更改
- git-status - 显示工作树状态
- git-log - 显示提交日志
分支操作
- git-branch - 列出、创建或删除分支
- git-checkout - 切换分支或恢复工作树文件
- git-switch - 切换分支
- git-merge - 将两个或多个开发历史合并在一起
- git-rebase - 在另一个基础提交之上重新应用提交
远程操作
- git-remote - 管理远程仓库
- git-fetch - 从远程仓库下载对象和引用
- git-pull - 从另一个仓库或本地分支获取并合并
- git-push - 更新远程引用及关联对象
撤销操作
- git-reset - 重置当前 HEAD 到指定状态
- git-restore - 恢复工作树文件
- git-revert - 还原一些现有提交
- git-stash - 将更改储藏在脏工作目录中
比较与检查
所有命令
A
B
C
- git-cat-file
- git-check-attr
- git-check-ignore
- git-check-mailmap
- git-check-ref-format
- git-checkout
- git-checkout-index
- git-cherry
- git-cherry-pick
- git-citool
- git-clean
- git-clone
- git-column
- git-commit
- git-commit-graph
- git-commit-tree
- git-config
- git-count-objects
- git-credential
- git-credential-cache
- git-credential-cache--daemon
- git-credential-store
- git-cvsexportcommit
- git-cvsimport
- git-cvsserver
D
- git-daemon
- git-describe
- git-diagnose
- git-diff
- git-diff-files
- git-diff-index
- git-diff-pairs
- git-diff-tree
- git-difftool
F
- git-fast-export
- git-fast-import
- git-fetch
- git-fetch-pack
- git-filter-branch
- git-fmt-merge-msg
- git-for-each-ref
- git-for-each-repo
- git-format-patch
- git-format-rev
- git-fsck
- git-fsck-objects
- git-fsmonitor--daemon
G
H
I
L
M
- git-mailinfo
- git-mailsplit
- git-maintenance
- git-merge
- git-merge-base
- git-merge-file
- git-merge-index
- git-merge-one-file
- git-merge-tree
- git-mergetool
- git-mergetool--lib
- git-mktag
- git-mktree
- git-multi-pack-index
- git-mv
N
P
- git-p4
- git-pack-objects
- git-pack-redundant
- git-pack-refs
- git-patch-id
- git-prune
- git-prune-packed
- git-pull
- git-push
Q
R
- git-range-diff
- git-read-tree
- git-rebase
- git-receive-pack
- git-reflog
- git-refs
- git-remote
- git-remote-ext
- git-remote-fd
- git-repack
- git-replace
- git-replay
- git-repo
- git-request-pull
- git-rerere
- git-reset
- git-restore
- git-rev-list
- git-rev-parse
- git-revert
- git-rm
S
- git-send-email
- git-send-pack
- git-sh-i18n
- git-sh-i18n--envsubst
- git-sh-setup
- git-shell
- git-shortlog
- git-show
- git-show-branch
- git-show-index
- git-show-ref
- git-sparse-checkout
- git-stage
- git-stash
- git-status
- git-stripspace
- git-submodule
- git-svn
- git-switch
- git-symbolic-ref
T
U
- git-unpack-file
- git-unpack-objects
- git-update-index
- git-update-ref
- git-update-server-info
- git-upload-archive
- git-upload-pack
- git-url-parse
V
W
本手册基于 Git 官方文档翻译,持续更新中。
