Main Porcelain Commands 主要命令
add Add file contents to the index
将文件内容添加到索引中
am Apply a series of patches from a mailbox
从邮箱应用一系列补丁
archive Create an archive of files from a named tree
归档从命名树创建文件归档
bisect Use binary search to find the commit that introduced a bug
使用二分查找引入错误的提交
branch List, create, or delete branches
列出、创建或删除分支
bundle Move objects and refs by archive
按存档移动对象和引用
checkout Switch branches or restore working tree files
切换分支或还原工作树文件
cherry-pick Apply the changes introduced by some existing commits
应用一些现有提交引入的更改
citool Graphical alternative to git-commit
git commit的图形化替代方案
clean Remove untracked files from the working tree
从工作树中删除未跟踪的文件
clone Clone a repository into a new directory
将存储库克隆到新目录中
commit Record changes to the repository
提交记录更改到存储库
describe Give an object a human readable name based on an available ref
根据可用的引用为对象命名
diff Show changes between commits, commit and working tree, etc
显示提交、提交和工作树等之间的变化
fetch Download objects and refs from another repository
从另一个存储库获取下载对象和引用
format-patch Prepare patches for e-mail submission
为电子邮件提交准备补丁
gc Cleanup unnecessary files and optimize the local repository
清理不必要的文件并优化本地存储库
gitk The Git repository browser
Git仓库浏览器
grep Print lines matching a pattern
打印与图案匹配的行
gui A portable graphical interface to Git
Git的可移植图形界面
init Create an empty Git repository or reinitialize an existing one
创建一个空的Git仓库或重新初始化一个现有的仓库
log Show commit logs
显示提交日志
merge Join two or more development histories together
将两个或多个开发历史连接在一起
mv Move or rename a file, a directory, or a symlink
移动或重命名文件、目录或符号链接
notes Add or inspect object notes
注释添加或检查对象注释
pull Fetch from and integrate with another repository or a local branch
从另一个存储库或本地分支中提取Fetch并与之集成
push Update remote refs along with associated objects
推送更新远程参照以及相关对象
range-diff Compare two commit ranges (e.g. two versions of a branch)
比较两个提交范围(例如,一个分支的两个版本)
rebase Reapply commits on top of another base tip
在另一个基本提示之上重新应用提交
reset Reset current HEAD to the specified state
重置将当前HEAD重置为指定状态
restore Restore working tree files
还原工作树文件
revert Revert some existing commits
还原一些现有提交
rm Remove files from the working tree and from the index
从工作树和索引中删除文件
shortlog Summarize 'git log' output
总结“git log”输出
show Show various types of objects
显示各种类型的对象
sparse-checkout Initialize and modify the sparse-checkout
初始化和修改稀疏签出
stash Stash the changes in a dirty working directory away
将更改存放在脏的工作目录中
status Show the working tree status
显示工作树状态
submodule Initialize, update or inspect submodules
子模块初始化、更新或检查子模块
switch Switch branches
交换分支
tag Create, list, delete or verify a tag object signed with GPG
创建、列出、删除或验证用GPG签名的标记对象
worktree Manage multiple working trees
管理多棵工作树
05-04
5462
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-19
272
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)