usage: git [--version] [--help] [-C <path>] [-c <name>=<value>]
[--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
<command> [<args>]
用法:git[——版本][——帮助][- c <路径>][- c <名称> = <价值>]
[——exec-path[= <路径>]][——目录][——man-path] [——info-path]
[- p - p | | - - - |分页——no-pager] [——no-replace-objects][——裸]
[——git-dir = <路径>][——work-tree = <路径>][——名称空间= <名称>]
<命令>(<参数>)
These are common Git commands used in various situations:
这些是在各种情况下使用的通用Git命令:
1、start a working area (see also: git help tutorial)
1、启动一个工作区(参见:git帮助教程)
clone Clone a repository into a new directory
clone 将存储库克隆到新目录中
init Create an empty Git repository or reinitialize an existing one
init 创建一个空的Git存储库,或者重新初始化一个现有的存储库
2、work on the current change (see also: git help everyday)
2、处理当前更改(请参见:git help everyday)
add Add file contents to the index
add 将文件内容添加到索引中
mv Move or rename a file, a directory, or a symlink
mv 移动或重命名文件、目录或符号链接
reset Reset current HEAD to the specified state
reset 撤销暂存区全部内容
rm Remove files from the working tree and from the index
rm 从工作树和索引中删除文件
3、examine the history and state (see also: git help revisions)
3、检查历史和状态(请参见:git帮助修订)
bisect Use binary search to find the commit that introduced a bug
bisect 使用二分查找查找引入错误的提交
grep Print lines matching a pattern
grep 将符合样式的该行列出
log Show commit logs
log 显示提交日志
show Show various types of objects
show 显示各种类型的对象
status Show the working tree status
status 显示工作树状态
4、grow, mark and tweak your common history
4、成长,标记和调整你们共同的历史
branch List, create, or delete branches
branch 分支列表,创建或删除分支
checkout Switch branches or restore working tree files
checkout 切换分支或还原工作树文件
commit Record changes to the repository
commit 记录对存储库的更改
diff Show changes between commits, commit and working tree, etc
diff 显示提交、提交和工作树等之间的更改
merge Join two or more development histories together
merge 将两个或多个开发历史连接在一起
rebase Reapply commits on top of another base tip
rebase 在另一个基本提示之上重新应用提交
tag Create, list, delete or verify a tag object signed with GPG
tag 创建、列表、删除或验证用GPG签名的标记对象
5、collaborate (see also: git help workflows)
5、协作(参见:git帮助工作流)
fetch Download objects and refs from another repository
fetch 从另一个存储库下载对象和引用
pull Fetch from and integrate with another repository or a local branch
pull 从另一个存储库或本地分支获取并与之集成
push Update remote refs along with associated objects
push 更新远程引用和相关对象
'git help -a' and 'git help -g' list available subcommands and some concept guides.
'git help -a' and 'git help -g' 列出可用的子命令和一些概念指南。
See 'git help <command>' or 'git help <concept>' to read about a specific subcommand or concept.
请参阅“git帮助<命令>”或“git帮助<概念>”以了解特定子命令或概念。