Git CMD - show: Show various types of objects

命令格式

git show [options] <object>…?

实例

a) 查看某次提交的信息

$ git show <commit>

b) 查看远程仓库的信息。

git remote show origin

c) 查看 tag 信息。

$ git show <tag>

更多

http://git-scm.com/docs/git-show

时间: 2024-08-06 03:41:16

Git CMD - show: Show various types of objects的相关文章

Git CMD - fetch: Download objects and refs from another repository

命令格式 git fetch [<options>] [<repository> [<refspec>…?]] git fetch [<options>] <group> git fetch --multiple [<options>] [(<repository> | <group>)…?] git fetch --all [<options>] 命令参数 --dry-run 不执行任何操作,只显

[Git]2018-10 解决git cmd中文乱码问题

2018年10月12日 莫名其妙出现cmd下git log中文乱码问题,显示一堆<E4><A8>之类的乱码.git bash却一切正常. 怀疑是Windows系统升级出现的不兼容问题. 把git升级到最新版本,没有解决问题. 参考网上设置 git config --global i18n.logoutputencoding gbk 无果,反而git bash也出现了乱码问题.大概判断是cmd的编码配置问题. 配置重设为:git config --global i18n.logout

Git CMD - rm: Remove files from the working tree and from the index

命令格式 git rm [-f | --force] [-n] [-r] [--cached] [--ignore-unmatch] [--quiet] [--] <file>…? 命令参数 -f, --force 强制删除. -r 递归删除目录及其内容. -- cached 从暂存区移除文件,不再跟踪文件,工作区的文件仍保留下来. -q, --quit 安静模式. 实例 a) 从工作区和暂存区将文件移除. $ git rm testfile.txt b) 从工作区和暂存区将目录移除. $ g

Git CMD - reset: Reset current HEAD to the specified state

命令格式 git reset [-q] [<tree-ish>] [--] <paths>…? git reset (--patch | -p) [<tree-ish>] [--] [<paths>…?] git reset [--soft | --mixed [-N] | --hard | --merge | --keep] [-q] [<commit>] 命令格式 -- soft 回退版本,但不会回退工作区与暂存区的修改. -- mixed

Git CMD - add: Record changes to the repository

命令格式 git commit [-a | --interactive | --patch] [-s] [-v] [-u<mode>] [--amend] [--dry-run] [(-c | -C | --fixup | --squash) <commit>] [-F <file> | -m <msg>] [--reset-author] [--allow-empty] [--allow-empty-message] [--no-verify] [-e]

Git CMD - config: Get and set repository or global options

命令参数 --get 获取指定的配置项. --global 对于写选项:全局配置,将参数配置于 ~/.gitconfig 而不是仓库目录下的 .git/config.对于读选项:只从 ~/.gitconfig 文件中读取配置. --local 对于写选项:将参数配置于 仓库目录下的 .git/config,这是默认的设置. -l, --list 列出配置文件中的所有配置项. 配置文件 如果没有显示地指定 --file 选项,则有 4 个文件供 git 配置查询配置项. $(prefix)/etc

OpenStack git cmd

1.创建分支 建立分支是你创建代码的独立版本的动作,独立于你的主干分支.默认地,每次你提交到Git的文件都会被储存到“master(主干)”分支.现在我们来说说,你想要向项目里添加一个功能,但你想要能够回滚到现在版本,以防出现差错,或者你决定要放弃这个功能.这就是你创建分支的时候了. 创建并同时切换到你新建的分支命令: git checkout -b new_feature 或者,你可以先创建一个分支然后手动切换: git branch new_feature  git checkout new

Git CMD - init: Create an empty Git repository or reinitialize an existing one

命令格式 git init [-q | --quiet] [--bare] [--template=<template_directory>] [--separate-git-dir <git dir>] [--shared[=<permissions>]] [directory] 命令参数 --quiet, -q 安静模式,只打印错误和警告信息. 实例 a) 创建版本库 [[email protected] git]$ mkdir hello_git [[email 

git cmd set

set http_proxy=http://proxy.yourname.com:8080set http_proxy_user=set http_proxy_pass= git config --global http.proxy http://10.167.196.133:8080git config –global http.proxy http://user:[email protected]://10.10.10.10:8080 git config --system (或 --glo