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 ...
随机推荐
- pdo的工作方式与查错
pdo某些方法如prepare()会返回PDOStatement对象; 然后需要通过返回的PDOStatement对象的方法操作 当查错通过$pdo->errInfo()方法可能查不出错误信息 ...
- C# 调用 C++ dll (类型对照)
函数调用导致堆栈不对称.原因可能是托管的 PInvoke 签名与非托管的目标签名不匹配. 在dllimport中加入CallingConvention参数就行了,[DllImport(PCAP_DLL ...
- C# typeof()实例详解
typeof(C# 参考) 用于获取类型的 System.Type 对象.typeof 表达式采用以下形式: System.Type type = typeof(int); 备注 若要获取表达式的运 ...
- ABBYY FineReader的快速任务功能如何用
在使用ABBYY FineReader Pro for Mac OCR文字识别软件处理文档时,经常会执行一系列相同的步骤,如扫描.识别.将已识别文本导出为特定格式或导出至特定应用程序.针对经常执行的任 ...
- C#的委托 Action<>和Func<>
其实他们两个都是委托[代理]的简写形式. 一.[action<>]指定那些只有输入参数,没有返回值的委托 Delegate的代码: [csharp] public delegate vo ...
- 【Swift】读取文本文件字符串
var str:NSString = NSString.stringWithContentsOfFile(_srcouceFilePath,encoding:NSUTF8StringEncoding, ...
- ios 获取屏幕的属性和宽度
app尺寸,去掉状态栏 CGRect r = [ UIScreen mainScreen ].applicationFrame; r=0,20,320,460 屏幕尺寸 CGRect rx = [ U ...
- c# 鼠标在控件上拖动 移动窗体 移动窗口
#region 移动窗体 移动窗口 private Point _mousePoint; private int topA(Control cc) { if (cc == null || cc == ...
- IsolatedStorageException for Silverlight Application
if you are using the IsolatedStorage for application configuration storage, and when you get the Iso ...
- 常用JS
window.opener.location.reload(); 刷新上一个页面 window.opener=null;window.open('','_self');window.close(); ...