Git 学习笔记2 - 配置
2017-12-06 23:22
204 查看
环境
系统:window 10 x64git版本:Git for windows 2.8.1
配置文件优先级
仓库(.git/config) > 用户(-global) > 系统(-system)配置的方式
直接修改文件
不同的级别不同位置仓库级:仓库下的config .git/config
用户级:
系统级:
使用命令行
windows:cmd
Git Bash :鼠标右键 git bash here 或应用中
配置命令格式
配置的方式git配置的命令为 git config;
查看config文档: git config –help
查看已配置内容:
* 单项:git config 属性 * 如查看已配置的用户名:git config user.name * 查看所有已配置属性: * git config --list
配置
配置基本格式git config 位置 属性 属性内容
如配置用户级的git用户名:
git config –global user.name “John Doe”
位置:
仓库级:在仓库目录下使用不带位置的config
用户级: 位置中使用 –global
系统级: –system
基本配置:用户名和邮箱,在每次提交时都要用到。
git config –global user.name “你的用户名”
git config –global user.email 你的邮箱地址
常用配置
用户名:git config –global user.name “”
邮箱:
git config –global user.email your
默认编辑器:
git config –global core.editor
参考链接
起步 - 初次运行 Git 前的配置自定义 Git - 配置 Git
相关文章推荐
- 【Git学习笔记】1.5 - 初次运行 Git 前的配置
- GIT学习笔记——1.5 起步 - 初次运行 Git 前的配置
- Ubuntu下Git配置学习笔记
- Ubuntu下Git配置学习笔记
- 版本控制系统学习笔记1--《windows下安装和配置git》
- TinyCore学习笔记_apache2配置gitweb
- Git学习笔记(一)--- Git的安装与配置
- git 学习笔记 三 git 配置
- GitHub学习笔记 --- .gitignore配置说明
- Git学习笔记02-- 初次运行 Git 前的配置
- 【学习笔记】ubuntu12.04安装与配置gitolite搭建git服务器
- 学习笔记——jenkins+gradle+git配置
- Git学习笔记(1)——安装,配置,创建库,文件添加到库
- Ubuntu下Git配置学习笔记
- Ubuntu下Git配置学习笔记
- Git与GitHub学习笔记(七)Windows 配置Github ssh key
- Git学习笔记(9)——自定义配置
- 学习Git之笔记一---关于Git版本下载和环境搭建和配置
- Git 学习笔记 --- 安装和基本配置
- 【Git配置技巧】01. 配置文件git config介绍 --[码农老毕的学习笔记]