git config(转载)
From:http://www.g2w.me/2013/10/cache-github-credential-for-https-repository/
http://openwares.net/linux/gerrit_workflow.html
git config --system 配置全局 对应/etc/gitconfig
git config --global 配置当前用户 对应/root/.gitconfig文件
git config 配置当前版本库 对应版本库下.git/config
用户信息配置:
git config user.name <username>
git config user.email <email>
编辑器配置:
git config core.editor vim
git config core.color auto
颜色配置:
git config color.status auto
git config color.diff auto
git config color.branch auto
git config color.interactive auto
一次性打开所有颜色:
git config color.ui true
日志格式:
git config format.pretty oneline
提交模板:
git config commit.template '/etc/git-commit-template'
配置http仓库密码
使用http地址访问仓库时,每次进行push操作都会提示输入用户名和密码,比较麻烦。可以进行配置。
对于1.7.9及之后的版本
git config --global credential.helper cache
如果需要加上失效时间,可以如下配置
git config credential.helper 'cache --timeout=3600'
则密码会在1小时后失效
存储在磁盘上
git config --global credential.helper store
对于1.7.9之前的版本
需要显式的在git地址中加入用户名和密码,如https://you:password@github.com/you/example.git
git config remote.origin.url https://you:password@github.com/you/example.git
修改提交者的用户名和邮箱:
git commit --amend --author='Your Name <you@example.com>'
查看配置信息:
git config --list
更多配置,查看git config官方配置文档
配置http密码:https://www.kernel.org/pub/software/scm/git/docs/git-credential-store.html
查看日志git log
git config(转载)的更多相关文章
- git (转载)
文章转载 一:Git是什么? Git是目前世界上最先进的分布式版本控制系统. 二:SVN与Git的最主要的区别? SVN是集中式版本控制系统,版本库是集中放在中央服务器的,而干活的时候,用的都是自己的 ...
- git config 介绍
转载. https://blog.csdn.net/liuxiao723846/article/details/83113317 Git的三个重要配置文件分别是/etc/gitconfig,${HOM ...
- 一个小时学会Git(转载)
---恢复内容开始--- 一个小时学会Git 最近要与部门同事一起做技术分享,我选择了Git,因为Git 是一种在全球范围都广受欢迎的版本控制系统.在开发过程中,为了跟踪代码,文档,项目等信息 ...
- git config 配置
1. git config简介 我们知道config是配置的意思,那么git config命令就是对git进行一些配置.而配置一般都是写在配置文件里面,那么git的配置文件在哪里呢?互动一下,先问下大 ...
- 学习git config配置文件
设置 git status的颜色. git config --global color.status auto 一.Git已经在你的系统中了,你会做一些事情来客户化你的Git环境.你只需要做这些设置一 ...
- git submodule(转载)
From:http://www.worldhello.net/2010/01/26/425.html 删除 git submodule (git 库子模组) 有两种情况会创建 git submodul ...
- git config命令使用
1. git config简介 我们知道config是配置的意思,那么git config命令就是对git进行一些配置.而配置一般都是写在配置文件里面,那么git的配置文件在哪里呢?互动一下,先问下大 ...
- git config --global core.autocrlf false
git config --global core.autocrlf false warning: LF will be replaced by CRLF in .idea/vcs.xml.The f ...
- [译]git config
git config git config命令用来设置git的一些配置(包括全局配置和针对单个仓储的配置).git config命令能定义一个仓储的用户信息和用户偏好. 用法 git config u ...
随机推荐
- .net 开源相关
http://roslyn.codeplex.com/SourceControl/latest https://github.com/dotnet http://www.dotnetfoundatio ...
- Ubuntu 安装和配置redis数据库
Ubuntu 14.04下安装和配置redis数据库 小编现在在写一个分布式爬虫,要用到这个数据库,所以分享一下小编是如何安装和配置的,希望对大家有帮助. 工具/原料 Ubuntu 系统电脑一台 ...
- JavaOOP 试题
1) 以下属于OOP的特征有(). a)继承 b)封装 c)多态 d)隐藏 2) JavaOOP中的多态包括() a) 方法重写 b) 方法重载 c) 方法隐藏 d) 以上 ...
- Asp.net获取用户真实Ip地址
/// <summary> /// 获取远程访问用户的Ip地址 /// </summary> /// <returns>返回Ip地址</returns> ...
- 【Reporting Services 报表开发】— 矩阵的使用
矩阵,相较于数据表示一维的数据,只能指定固定的数据列,来呈现动态的明细数据行,所以,它可以说是种二维的数据展现形式,让我们能够很容易地从数据行和数据集的交替中查看对应的汇总信息.像SQL Server ...
- DIV+CSS命名规范-转载1
命名规则说明: 1).所有的命名最好都小写 2).属性的值一定要用双引号("")括起来,且一定要有值如class="divcss5",id="divc ...
- HBase(五): HBase运维管理
HBase自带的很多工具可用于管理.分析.修复和调试,这些工具一部分的入口是hbase shell 客户端,另一部分是在hbase的Jar包中. 目录: hbck hfile 数据备份与恢复 Snap ...
- Android 隐藏Fragment
1.隐藏Fragment FragmentManager fManager = getFragmentManager(); fManager.beginTransaction() .setCustom ...
- rm命令
rm是一个危险的命令,使用的时候要特别当心,尤其对于新手,否则整个系统就会毁在这个命令(比如在/(根目录)下执行rm * -rf).所以,我们在执行rm之前最好先确认一下在哪个目录,到底要删除什么东西 ...
- 【linux】linux服务管理
ps:xinetd只要求了解