git一些常用设置
用法:git config [选项]
配置文件位置
--global 使用全局配置文件
--system 使用系统级配置文件
--local 使用版本库级配置文件
-f, --file <文件> 使用指定的配置文件
--blob <数据对象ID> 从给定的数据对象读取配置
操作
--get 获取值:name [value-regex]
--get-all 获得所有的值:key [value-regex]
--get-regexp 根据正则表达式获得值:name-regex [value-regex]
--get-urlmatch 获得 URL 取值:section[.var] URL
--replace-all 替换所有匹配的变量:name value [value_regex]
--add 添加一个新的变量:name value
--unset 删除一个变量:name [value-regex]
--unset-all 删除所有匹配项:name [value-regex]
--rename-section 重命名小节:old-name new-name
--remove-section 删除一个小节:name
-l, --list 列出所有
-e, --edit 打开一个编辑器
--get-color <slot> 找到配置的颜色:[默认]
--get-colorbool <slot>
找到颜色设置:[stdout-is-tty]
类型
--bool 值是 "true" 或 "false"
--int 值是十进制数
--bool-or-int 值是 --bool or --int
--path 值是一个路径(文件或目录名)
其它
-z, --null 终止值是NUL字节
--includes 查询时参照 include 指令递归查找
1.查看config
git config --list
可以列出所有config配置
user.email=tang_m_cong@.com
user.name=thomas
core.editor=vim
alias.co=checkout
alias.br=branch
alias.ci=commit
alias.st=status
alias.last=log - HEAD
alias.d=difftool
color.diff=auto
color.status=auto
color.branch=auto
diff.tool=bc3
difftool.bc3.path=/usr/bin/bcompare
merge.tool=bc3
mergetool.bc3.path=usr/bin/bcompare
difftool.prompt=false
mergetool.prompt=false
core.repositoryformatversion=
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.url=https://git.oschina.net/thammer/hisimain.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
2.常用config:
git config --global diff.tool bc3
git config --global difftool.bc3.path "/usr/bin/bcompare"
git config --global difftool.prompt false
git config --global alias.dt difftool
3.杂七杂八
git log --name-status:查看提交时修改了哪些文件
- git add -A All
- git add . stages new and modified, without deleted
- git add -u without new
后续补充
git一些常用设置的更多相关文章
- GIT 版本控制常用命令学习汇总
GIT 版本控制常用命令汇总 git version 查看当前git版本信息 git help 获取全部命令帮助信息 git help <command> 获取指定命令帮助信息 git c ...
- 记录一下git 的常用命令
以后如果要写一个东西,最好先搭建一个本地仓库,用版本控制对其进行操作,可能一开始有一些麻烦,但是很有可能会受益无穷. 说到git,必然会和github联系起来. 不管是在ubuntu里面还是在Wind ...
- linux云服务器常用设置
前面的话 由于在云服务器上配置自己的网站,将Linux里的常用设置记录如下 更改shell 默认地, ubuntu系统默认的shell是dash,但更常用的shell是bash 通过下面命令可以将da ...
- git操作常用命令
一.使用git 1.git是什么? Git是目前世界上最先进的分布式版本控制系统. SVN与Git的最主要的区别? SVN是集中式版本控制系统,版本库是集中放在中央服务器的,而干活的时候,用的都是自己 ...
- Eclipse常用设置及快捷键
1. Eclipse常用设置 1.1 代码自动提示 选择菜单:Window -> Preferences -> Java -> Editor -> Content Assist ...
- Visual Studio Code常用设置及快捷键
1. Visual Studio Code常用设置 { // 控制是否显示 minimap(缩略图) "editor.minimap.enabled": false, // 控制折 ...
- Git 基础 —— 常用命令
Git 基础学习系列 Git 基础 -- 安装 配置 别名 对象 Git 基础 -- 常用命令 Git 基础 -- 常见使用场景 Git基础 -- Github 的使用 git init 创建 Git ...
- git的常用命令。。
git的常用命令.. git help <command> 显示command的help git show 显示某次提交的内容 git show $id git co -- <f ...
- git介绍-常用操作(一)
Table of Contents 1 系列文章 2 git说明 3 git常用命令 3.1 基本操作 3.2 远程操作 4 查看git的配置 4.1 查看已配置项 4.2 其他配置 ...
随机推荐
- WPF中实现自定义虚拟容器(实现VirtualizingPanel)
WPF中实现自定义虚拟容器(实现VirtualizingPanel) 在WPF应用程序开发过程中,大数据量的数据展现通常都要考虑性能问题.有下面一种常见的情况:原始数据源数据量很大,但是某一时刻数据容 ...
- 1 初识Orchard
网上关于Orchard的介绍已经很多了,具体Orchard是干啥的我就不再啰嗦,这个系列的主要目的就是介绍学习和使用orchard的过程,和在此过程中碰到问题的解决方案.下面直接进入正题. 获取orc ...
- POJ 1836 Alignment 最长递增子序列(LIS)的变形
大致题意:给出一队士兵的身高,一开始不是按身高排序的.要求最少的人出列,使原序列的士兵的身高先递增后递减. 求递增和递减不难想到递增子序列,要求最少的人出列,也就是原队列的人要最多. 1 2 3 4 ...
- 转载Quandl R Package
Quandl R Package 通过Quandl API可以快速准确地获取宏观经济数据.(https://www.quandl.com/docs/api) 分享两个国外的优秀网站 R和Python在 ...
- Convert string to binary and binary to string in C#
String to binary method: public static string StringToBinary(string data) { StringBuilder sb = new S ...
- webform(内置对象)
一.内置对象 (一)Response - 响应请求对象1.定义:Response对象用于动态响应客户端请示,控制发送给用户的信息,并将动态生成响应.Response对象只提供了一个数据集合cookie ...
- [Azure] Notification Hubs注册模式
[Azure] Notification Hubs注册模式 关于Azure Notification Hubs的注册模式,可以参考下列连结的文件内容. Notification Hubs Featur ...
- 如何rename sqlserver database
Problem Sometimes there is a need to change the name of your database whether this is because the or ...
- Vue自定义过滤器
gitHub地址: https://github.com/lily1010/vue_learn/tree/master/lesson05 一 自定义过滤器(注册在Vue全局) 注意事项: (1)全局方 ...
- Vue自带的过滤器
gitHub地址:https://github.com/lily1010/vue_learn/tree/master/lesson05 一 过滤器写法 {{ message | Filter}} 二 ...