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(转载)的更多相关文章

  1. git (转载)

    文章转载 一:Git是什么? Git是目前世界上最先进的分布式版本控制系统. 二:SVN与Git的最主要的区别? SVN是集中式版本控制系统,版本库是集中放在中央服务器的,而干活的时候,用的都是自己的 ...

  2. git config 介绍

    转载. https://blog.csdn.net/liuxiao723846/article/details/83113317 Git的三个重要配置文件分别是/etc/gitconfig,${HOM ...

  3. 一个小时学会Git(转载)

    ---恢复内容开始--- 一个小时学会Git     最近要与部门同事一起做技术分享,我选择了Git,因为Git 是一种在全球范围都广受欢迎的版本控制系统.在开发过程中,为了跟踪代码,文档,项目等信息 ...

  4. git config 配置

    1. git config简介 我们知道config是配置的意思,那么git config命令就是对git进行一些配置.而配置一般都是写在配置文件里面,那么git的配置文件在哪里呢?互动一下,先问下大 ...

  5. 学习git config配置文件

    设置 git status的颜色. git config --global color.status auto 一.Git已经在你的系统中了,你会做一些事情来客户化你的Git环境.你只需要做这些设置一 ...

  6. git submodule(转载)

    From:http://www.worldhello.net/2010/01/26/425.html 删除 git submodule (git 库子模组) 有两种情况会创建 git submodul ...

  7. git config命令使用

    1. git config简介 我们知道config是配置的意思,那么git config命令就是对git进行一些配置.而配置一般都是写在配置文件里面,那么git的配置文件在哪里呢?互动一下,先问下大 ...

  8. 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 ...

  9. [译]git config

    git config git config命令用来设置git的一些配置(包括全局配置和针对单个仓储的配置).git config命令能定义一个仓储的用户信息和用户偏好. 用法 git config u ...

随机推荐

  1. Linux perf tools

    http://techblog.netflix.com/2015/08/netflix-at-velocity-2015-linux.html

  2. #你好Unity3D#Hierarchy视图监听gameObject点击事件

    今天无意间又找到了个好方法     1 2 3 4 5 6 7 8 9 10 [InitializeOnLoadMethod] static void Start () {   Selection.s ...

  3. 怎么在OCR文字识别软件中安装和启动 OCR文字识别软件 Hot Folder

    默认情况下,ABBYY Hot Folder 会与 ABBYY FineReader 12 一起安装到计算机中.(关于ABBYY FineReader 12请参考ABBYY FineReader 12 ...

  4. oracle schema object

    Oracle supplies many PL/SQL packages with the Oracle server to extend database functionality and pro ...

  5. 1 TKinter小窗口及标题

    说明 :本博客户关于tkinter的知识参考:2014 年辛星 Python 界面编程教程第二版 创建一个GUI程序的步骤: 创建一个GUI程序 1.导入Tkinter模块 2.创建控件 3.指定这个 ...

  6. ubuntu 安装 boost

    1.tar -zxvf  boost_1_43_0.tar.gz 2.cd boost_1_43_0, 执行: sudo ./bootstrap.sh sudo ./bjam install 检验安装 ...

  7. JavaScript兼容性问题

    Firefox浏览器不支持js的innerText属性:

  8. Jfinal连接自助数据库的数据源

    # 开发数据库地址 #jdbcUrl = jdbc:oracle:thin:@localhost:1521:testsa jdbcUrl = jdbc:srdbsql://127.0.0.1:1975 ...

  9. android操作sdcard中的多媒体文件(二)——音乐列表的更新

    android操作sdcard中的多媒体文件(二)——音乐列表的更新 原文地址 在上一篇随笔中,我介绍了如何在程序中查询sdcard内的多媒体文件,并且显示到播放列表中,但是,如果在sdcard内删除 ...

  10. [activiti] Activiti 5.18 的Mybatis版本依赖问题

    测试activiti 是查询Task时抛出一个异常: org.apache.ibatis.exceptions.PersistenceException: ### Error querying dat ...