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/gitconfig
全系统的配置文件
~/.gitconfig
用户特定的配置文件,也称为全局配置文件。
$XDG_CONFIG_HOME/git/config
用户特定的次要的配置文件。如果 $XDG_CONFIG_HOME 没有设置或者为空,$HOME/.config/git/config 会被替代。
$GIT_DIR/config
仓库特定的配置文件。
实例
a) 设置用户名与用户邮件 ID
$ git config --global user.name "huey"
$ git config --global user.email "huey@example.com"
b) 设置颜色高亮
$ git config --global color.ui true
c) 列出当前的配置选项
$ git config --list
更多
http://git-scm.com/docs/git-config
Git CMD - config: Get and set repository or global options的更多相关文章
- git配置config文件
1.Git有一个工具被称为git config,它允许你获取和设置变量:这些变量可以控制Git的外观和操作的各个方面.这些变量以等级的不同可以被存储在三个不同的位置: (1) /etc/gitconf ...
- git "Could not read from remote repository.Please make&n
git "Could not read from remote repository.Please make sure you have the correct access rights. ...
- Git GUI,Git Bash,Git CMD之间的区别
Git GUI,Git Bash,Git CMD之间的区别 Git Bash: Bash,Unix shell的一种,Linux与Mac OS X v10.4都将它作为默认shell.Git Bash ...
- Git CMD - init: Create an empty Git repository or reinitialize an existing one
命令格式 git init [-q | --quiet] [--bare] [--template=<template_directory>] [--separate-git-dir &l ...
- Git CMD - clone: Clone a repository into a new directory
命令格式 git clone [--template=<template_directory>] [-l] [-s] [--no-hardlinks] [-q] [-n] [--bare ...
- Git CMD - fetch: Download objects and refs from another repository
命令格式 git fetch [<options>] [<repository> [<refspec>…]] git fetch [<options> ...
- Git CMD - pull: Fetch from and integrate with another repository or a local branch
命令格式 git pull [options] [<repository> [<refspec>…]] 命令参数 -q, --quiet 安静模式. -v, --verbos ...
- Git CMD连接,管理(remote,add,commit,push)github repository
git initmd testcd testgit statusgit add test //git add test/a.txtgit status git remote add origin g ...
- Git CMD - add: Record changes to the repository
命令格式 git commit [-a | --interactive | --patch] [-s] [-v] [-u<mode>] [--amend] [--dry-run] [(-c ...
随机推荐
- POJ 2763 Housewife Wind (树链剖分 有修改单边权)
题目链接:http://poj.org/problem?id=2763 n个节点的树上知道了每条边权,然后有两种操作:0操作是输出 当前节点到 x节点的最短距离,并移动到 x 节点位置:1操作是第i条 ...
- HDU/杭电2013多校第三场解题报告
今天悲剧了,各种被虐啊,还是太年轻了 Crime 这道题目给的时间好长,第一次就想到了暴力,结果华丽丽的TLE了. 后来找了一下,发现前24个是1, 2, 6, 12, 72, 72, 864, 17 ...
- ntdll.dll函数原型
/*NTDLL Base Functions*/NTSYSAPI NTSTATUS NTAPI NtAcceptConnectPort( OUT PHANDLE PortHandle, IN PVOI ...
- Cocos2d-x——CocosBuilder官方帮助文档翻译3 动画
Working with Animations 动画 You can use CocosBuilder for creating character animations, animating com ...
- Ubuntu 12.04 中安装和配置 Java JDK
先去 Oracle下载Linux下的JDK压缩包,我下载的是jdk-7u4-linux-i586.tar.gz文件,下好后直接解压 sudo mv ./jdk1.7.0_55 /usr/lib/jdk ...
- Hash Table构建
get-item e:\test\* |format-table @{name="aa";expression={$_.name.tostring().split(".& ...
- 如何让自己的电脑发布ASP http://jingyan.baidu.com/article/19192ad853224ce53f570748.html
怎样在WIN7系统下安装IIS | 浏览:122821 | 更新:2012-03-03 14:07 | 标签:windows7 1 2 3 4 5 6 7 分步阅读 在此根据多年的网站开发经验,把如何 ...
- Spark1.0.0新特性
Spark1.0.0 release于2014-05-30日正式公布,标志Spark正式进入1.X的时代.Spark1.0.0带来了各种新的特性,并提供了更好的API支持:Spark1 ...
- pod install warning
warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777 解决方法: sudo chmod 775 /usr/l ...
- 硝烟中的scrum学习笔记 - 怎样制定Sprint计划(Plan Meeting)
1. 如何估算我们这个sprint能做多少个故事点 1) 本能反应 2) 生产率计算 估算生产率/实际生产率 看看团队的历史,看看他们在过去几个sprint里的生产率是多少 然后假定在下一个sp ...