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 ...
随机推荐
- JS与Jquery的事件委托——解决了绑定相同事件的问题
概念: 什么是事件委托:通俗的讲,事件就是onclick,onmouseover,onmouseout,等就是事件,委托呢,就是让别人来做,这个事件本来是加在某些元素上的,然而你却加到别人身上来做,完 ...
- linux使用getopt解析参数
getopt是linux下解析命令行参数的api.以linux内核代码的一个例子来说明: static void cmdline(int argc, char *argv[]){ int o ...
- VS 2012单元测试和测试资源管理器
时间:2012-08-27 17:29 来源:张善友 博客园 字体:[大 中 小] 现在您可以在您的项目当中自行选择 NUnit 或是 xUnit 之类的套件. 而且这次的测试资源管理器也完全以”信息 ...
- 【不积跬步,无以致千里】VIM查找替换归纳总结zz
http://spaces.msn.com/dingy/blog/cns!2F24B9E66A542581!327.entry VIM中常用的替换模式总结. 1,简单替换表达式 替换命令可以在全文中用 ...
- cocos2d-x CCScrollView
转自:http://www.cnblogs.com/dcxing/archive/2012/12/31/2840217.html ScrollView一般用在游戏的关卡选择这种类似的场景还有帮助这种场 ...
- PostgreSQL的schema信息,存储于何处
查看schema信息: [pgsql@localhost bin]$ ./psql psql () Type "help" for help. pgsql=# create sch ...
- 单例模式总结(Java版)
1:懒汉的设计模式,在第一次调用的时候才完成相关的初始化操作 懒汉式是典型的时间换空间,就是每次获取实例都会进行判断,看是否需要创建实例,浪费判断的时间.当然,如果一直没有人使用的话,那就不会创建实例 ...
- python的一些总结4
这篇继续水 但是在水的的基础上 让搭建能正常使用flask 搭建一个站 上篇讲到在 模板view中 输入{{xx }} 可以打印 后台传的值. 这篇讲一下 循环控制 条件控制等 修改后台代码: @ap ...
- Codeforces Round #114 (Div. 1) A. Wizards and Trolleybuses 物理题
A. Wizards and Trolleybuses Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/conte ...
- URAL 1776 C - Anniversary Firework DP
C - Anniversary FireworkTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hust.edu.cn/vjudge/c ...