Git如何获取帮助(命令解释/命令详情)?
目录
1、问题--如何获取git帮助?
2、贴心的git--总是在你需要时出现!
(1)当你输错命令,它会给出建设性意见,很是贴心!就比如这样:
(2)其次,其实我们直接输入git,就会输出相关命令。就像下面这样:
(3)有上面第三行可以看到:'git help -a' and 'git help -g',试试呗!
3、万能的git,想要啥都能出来!
(1)我们先来看看官网的介绍的几种方法:
(2)简单分析:
(3)演示一下: git status --help
因为复制了比较多命令,比较占篇幅,一开始可以通过文章右边的“目录”栏选看主要内容,后面再研究这些命令。
1、问题--如何获取git帮助?
使用git的过程中,经常会遇到命令打错,或者是参数弄错的情况,那有什么办法可以查看git帮助吗?
2、贴心的git--总是在你需要时出现!
(1)当你输错命令,它会给出建设性意见,很是贴心!就比如这样:
$ git statu
git: 'statu' is not a git command. See 'git --help'.The most similar commands arestatusstagestash
(2)其次,其实我们直接输入git,就会输出相关命令。就像下面这样:
$ git
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>]These are common Git commands used in various situations:start a working area (see also: git help tutorial)clone Clone a repository into a new directoryinit Create an empty Git repository or reinitialize an existing onework on the current change (see also: git help everyday)add Add file contents to the indexmv Move or rename a file, a directory, or a symlinkreset Reset current HEAD to the specified staterm Remove files from the working tree and from the indexexamine the history and state (see also: git help revisions)bisect Use binary search to find the commit that introduced a buggrep Print lines matching a patternlog Show commit logsshow Show various types of objectsstatus Show the working tree statusgrow, mark and tweak your common historybranch List, create, or delete branchescheckout Switch branches or restore working tree filescommit Record changes to the repositorydiff Show changes between commits, commit and working tree, etcmerge Join two or more development histories togetherrebase Reapply commits on top of another base tiptag Create, list, delete or verify a tag object signed with GPGcollaborate (see also: git help workflows)fetch Download objects and refs from another repositorypull Fetch from and integrate with another repository or a local branchpush Update remote refs along with associated objects'git help -a' and 'git help -g' list available subcommands and some
concept guides. See 'git help <command>' or 'git help <concept>'
to read about a specific subcommand or concept.
(3)有上面第三行可以看到:'git help -a' and 'git help -g',试试呗!
$ git help -a
See 'git help <command>' to read about a specific subcommandMain Porcelain Commandsadd Add file contents to the indexam Apply a series of patches from a mailboxarchive Create an archive of files from a named treebisect Use binary search to find the commit that introduced a bugbranch List, create, or delete branchesbundle Move objects and refs by archivecheckout Switch branches or restore working tree filescherry-pick Apply the changes introduced by some existing commitscitool Graphical alternative to git-commitclean Remove untracked files from the working treeclone Clone a repository into a new directorycommit Record changes to the repositorydescribe Give an object a human readable name based on an available refdiff Show changes between commits, commit and working tree, etcfetch Download objects and refs from another repositoryformat-patch Prepare patches for e-mail submissiongc Cleanup unnecessary files and optimize the local repositorygitk The Git repository browsergrep Print lines matching a patterngui A portable graphical interface to Gitinit Create an empty Git repository or reinitialize an existing onelog Show commit logsmerge Join two or more development histories togethermv Move or rename a file, a directory, or a symlinknotes Add or inspect object notespull Fetch from and integrate with another repository or a local branchpush Update remote refs along with associated objectsrange-diff Compare two commit ranges (e.g. two versions of a branch)rebase Reapply commits on top of another base tipreset Reset current HEAD to the specified staterevert Revert some existing commitsrm Remove files from the working tree and from the indexshortlog Summarize 'git log' outputshow Show various types of objectsstash Stash the changes in a dirty working directory awaystatus Show the working tree statussubmodule Initialize, update or inspect submodulestag Create, list, delete or verify a tag object signed with GPGworktree Manage multiple working treesAncillary Commands / Manipulatorsconfig Get and set repository or global optionsfast-export Git data exporterfast-import Backend for fast Git data importersfilter-branch Rewrite branchesmergetool Run merge conflict resolution tools to resolve merge conflictspack-refs Pack heads and tags for efficient repository accessprune Prune all unreachable objects from the object databasereflog Manage reflog informationremote Manage set of tracked repositoriesrepack Pack unpacked objects in a repositoryreplace Create, list, delete refs to replace objectsAncillary Commands / Interrogatorsannotate Annotate file lines with commit informationblame Show what revision and author last modified each line of a filecount-objects Count unpacked number of objects and their disk consumptiondifftool Show changes using common diff toolsfsck Verifies the connectivity and validity of the objects in the databasegitweb Git web interface (web frontend to Git repositories)help Display help information about Gitinstaweb Instantly browse your working repository in gitwebmerge-tree Show three-way merge without touching indexrerere Reuse recorded resolution of conflicted mergesshow-branch Show branches and their commitsverify-commit Check the GPG signature of commitsverify-tag Check the GPG signature of tagswhatchanged Show logs with difference each commit introducesInteracting with Othersarchimport Import a GNU Arch repository into Gitcvsexportcommit Export a single commit to a CVS checkoutcvsimport Salvage your data out of another SCM people love to hatecvsserver A CVS server emulator for Gitimap-send Send a collection of patches from stdin to an IMAP folderp4 Import from and submit to Perforce repositoriesquiltimport Applies a quilt patchset onto the current branchrequest-pull Generates a summary of pending changessend-email Send a collection of patches as emailssvn Bidirectional operation between a Subversion repository and GitLow-level Commands / Manipulatorsapply Apply a patch to files and/or to the indexcheckout-index Copy files from the index to the working treecommit-graph Write and verify Git commit-graph filescommit-tree Create a new commit objecthash-object Compute object ID and optionally creates a blob from a fileindex-pack Build pack index file for an existing packed archivemerge-file Run a three-way file mergemerge-index Run a merge for files needing mergingmktag Creates a tag objectmktree Build a tree-object from ls-tree formatted textmulti-pack-index Write and verify multi-pack-indexespack-objects Create a packed archive of objectsprune-packed Remove extra objects that are already in pack filesread-tree Reads tree information into the indexsymbolic-ref Read, modify and delete symbolic refsunpack-objects Unpack objects from a packed archiveupdate-index Register file contents in the working tree to the indexupdate-ref Update the object name stored in a ref safelywrite-tree Create a tree object from the current indexLow-level Commands / Interrogatorscat-file Provide content or type and size information for repository objectscherry Find commits yet to be applied to upstreamdiff-files Compares files in the working tree and the indexdiff-index Compare a tree to the working tree or indexdiff-tree Compares the content and mode of blobs found via two tree objectsfor-each-ref Output information on each refget-tar-commit-id Extract commit ID from an archive created using git-archivels-files Show information about files in the index and the working treels-remote List references in a remote repositoryls-tree List the contents of a tree objectmerge-base Find as good common ancestors as possible for a mergename-rev Find symbolic names for given revspack-redundant Find redundant pack filesrev-list Lists commit objects in reverse chronological orderrev-parse Pick out and massage parametersshow-index Show packed archive indexshow-ref List references in a local repositoryunpack-file Creates a temporary file with a blob's contentsvar Show a Git logical variableverify-pack Validate packed Git archive filesLow-level Commands / Synching Repositoriesdaemon A really simple server for Git repositoriesfetch-pack Receive missing objects from another repositoryhttp-backend Server side implementation of Git over HTTPsend-pack Push objects over Git protocol to another repositoryupdate-server-info Update auxiliary info file to help dumb serversLow-level Commands / Internal Helperscheck-attr Display gitattributes informationcheck-ignore Debug gitignore / exclude filescheck-mailmap Show canonical names and email addresses of contactscheck-ref-format Ensures that a reference name is well formedcolumn Display data in columnscredential Retrieve and store user credentialscredential-cache Helper to temporarily store passwords in memorycredential-store Helper to store credentials on diskfmt-merge-msg Produce a merge commit messageinterpret-trailers add or parse structured information in commit messagesmailinfo Extracts patch and authorship from a single e-mail messagemailsplit Simple UNIX mbox splitter programmerge-one-file The standard helper program to use with git-merge-indexpatch-id Compute unique ID for a patchsh-i18n Git's i18n setup code for shell scriptssh-setup Common Git shell script setup codestripspace Remove unnecessary whitespaceExternal commandsflowlfsCommand aliaseslogg log --graph --pretty=oneline --abbrev-commit
$ git help -gThe common Git guides are:attributes Defining attributes per pathcli Git command-line interface and conventionscore-tutorial A Git core tutorial for developerscvs-migration Git for CVS usersdiffcore Tweaking diff outputeveryday A useful minimum set of commands for Everyday Gitglossary A Git Glossaryhooks Hooks used by Gitignore Specifies intentionally untracked files to ignoremodules Defining submodule propertiesnamespaces Git namespacesrepository-layout Git Repository Layoutrevisions Specifying revisions and ranges for Gittutorial A tutorial introduction to Gittutorial-2 A tutorial introduction to Git: part twoworkflows An overview of recommended workflows with Git'git help -a' and 'git help -g' list available subcommands and some
concept guides. See 'git help <command>' or 'git help <concept>'
to read about a specific subcommand or concept.
3、万能的git,想要啥都能出来!
(1)我们先来看看官网的介绍的几种方法:
若你使用 Git 时需要获取帮助,有三种方法可以找到 Git 命令的使用手册:
$ git help <verb> $ git <verb> --help $ man git-<verb>
这些命令很棒,因为你随时随地可以使用而无需联网。
转自:git官网
前两种都可以在Windows和Linux的git中使用,第三种man是Linux的。(我比较常用的是第二种,命令后面直接求帮助。)
(2)简单分析:
前两种命令的作用都是一样的:打开本地的离线文档(网页),我的文件文件地址是: file:///G:/Git/mingw64/share/doc/git-doc/,即在安装git的目录下的对应文件夹中,用命令直接打开。
(3)演示一下: git status --help
看完这篇博客你还怕找不到git说明吗?
划重点:文档是全英文的,如果英语不过关,一开始建议弄个翻译软件,中英换着看,不要一直看中文的,因为有些内容翻译和实际意思会有很大偏差的。习惯了,看英语就很流畅了。
Git如何获取帮助(命令解释/命令详情)?相关推荐
- git push命令_Git Push命令解释
git push命令 The git push command allows you to send (or push) the commits from your local branch in y ...
- git 版本控制工具(五)-命令行汇总及其他操作
一.命令行汇总 git config //配置本地仓库 常用git config --global user.name.git config --global user.email git confi ...
- Shell脚本学习-阶段二十七-命令解释一
文章目录-命令解释一 前言 as expr gcc gcov gdb indent ld ldconfig ldd make mktemp nm objdump perl php protoize u ...
- Shell脚本学习-阶段二十七-命令解释二
文章目录-命令解释二 前言 emacs jed joe nano================ pico sed=================== vi,vim============ mtyp ...
- Git原理杂谈之pull/push命令
这边文章是基于之前三篇文章的后续篇,之前三篇能够帮助小白同学概要性地理解Git的整体原理及快速掌握Git基本技能以进入团队开发,所以建议对Git只了解些浅层内容的看客老爷们先看完前三篇再从本篇开始往后 ...
- Git版本控制软件结合GitHub常用命令学习手册
编程技术2015-1-16TECHUG1条评论 我们发布了很多Git相关的文章,有系列教程(<Pro Git系列>),也有各种独门绝技(<让你的Git水平更上一层楼的10个小贴士&g ...
- git远程仓库分支的各命令的具体解析(git remote add)
0 可参考文章 本文重点参考的Git官方中关于git远程仓库的使用教程: 2.5 Git 基础 - 远程仓库的使用 3.5 Git 分支 - 远程分支 1 问题背景 看完上面的教程后,我们再一步一步抠 ...
- git 强制推送_Git 常用命令清单,掌握这些,轻松驾驭版本管理
工程下载.分支的增删查改 工程下载: clone 远程工程:git clone https://XXXX.git fetch 远程分支到本地某分支:git fetch origin : 分支的增删查改 ...
- git 修改标签名称_Git常用命令汇总,希望能帮到你
展示帮助信息 git help -g 回到远程仓库的状态 抛弃本地所有的修改,回到远程仓库的状态. git fetch --all && git reset --hard origin ...
最新文章
- GAAFET与FinFET架构
- Python学习笔记系列——函数
- java反多态的代码_Java多态性代码详解
- 【转】蓝牙物理链路类型:SCO和ACL链路
- 排序算法复习—希尔排序
- 《你还在我身旁》 香港中文大学《独立时代》杂志社微情书征文大赛一等奖作品。作者为香港中文大学学生戴畅。
- go tcp socket
- python + Eclipse + Pydev 安装
- 【工具推荐】光影魔术手
- 甘特图制作_甘特图是用什么软件制作?
- java递归 杨辉三角_java杨辉三角递归实现
- java 查看类常量池_Java中常量以及常量池
- 计算机电子表格操作步骤,Excel电子表格操作基本步骤.doc
- GISer开发者的技能清单
- 恺撒密码的python实现介绍
- 计算机主机与外部接口,核心与外部设备间接口
- (四)万能的搜索 —— 2. 解救小哈
- 《北京DRGs系统的研究与应用》学习笔记
- android activity获取dialog对象,Android开发笔记之:Dialog的使用详解
- 适用于Windows11 任务栏开始菜单和图标,资源管理器显示异常修复的方法