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 ...
随机推荐
- jquery mouseout事件错误(bug)
移到子元素上时(例如,处在div中的图像),触发移出事件 (mouseout事件的一个常见错误). 解决办法是使用hover事件 在使用hover事件前,我抓耳挠腮的以为是margin或padding ...
- jQuery-vsdoc.js文件是vs中的JavaScript intellisense,
在VS 2008中启用jQuery Intellisense的步骤 要在VS中启用jQuery的intellisense完成,你要遵循三个步骤: 第一步: 安装VS 2008 SP1 VS 2008 ...
- 2016国赛B题小区数据爬取软件
-------------------------请以任何方式留言给作者,否则视为窃取----------------------------- 看你们找数据找的那么辛苦 我就苦逼的花了1个小时写了个 ...
- css_样式样式器的分类
详情:http://www.w3school.com.cn/h.asp 1.标签样式器:此样式器仅对html页面中div标签有效果 div{ background-color: rosybrown; ...
- xml学习笔记一(概述)
XML 被设计用来传输和存储数据. HTML 被设计用来显示数据. 什么是 XML? XML 指可扩展标记语言(EXtensible Markup Language) XML 是一种标记语言,很类似 ...
- SMO序列最小最优化算法
SMO例子: 1 from numpy import * 2 import matplotlib 3 import matplotlib.pyplot as plt 4 5 def loadDataS ...
- javascript 容错
window.onerror=function(){ return true;} 系统有onerror报错的代码,只要重新一下就可以在javascript错误的时候返回真(true)
- scala函数定义的四种方式
最近开始接触scala编程语言,觉得还是比较新的一个东西,虽然说和java比较像,是java的继承者,兼顾面向对象编程和函数式编程的优点,但是,终究是一个新的东西,还是要从最基本的学起.而这当中,函数 ...
- 设计师必看的10个HTML5动画工具
如果你想用令人难以置信的动画创建引人注目的网站的话,那么这里为设计师精心挑选了一些必备的HTML5动画工具.HTML5是设计师用来打造时尚网站的最流行的编程语言之一.在过去三年内,这种编程语言的使用人 ...
- 如何制作带MFC界面的MFC DLL
最近在做基于组件化MFC界面的开发,需要把界面封装到动态库中. 一:工程创建步骤 1.创建MFC DLL工程,选择 “在共享 DLL 中使用 MFC”. 2.运行时库选择:c/c++-->代码生 ...