zoukankan      html  css  js  c++  java
  • 【eclipse】配置author和commiter,git配置user.name和user.email

    概述
    eclipse 4.9.0
    使用git提交文件/代码时,会附带上当前操作者信息。
    在git中查看历史时,会通过操作者信息来确定谁修改了哪些文件/代码。
    在eclipse中,每次提交代码时,需要填写author和commiter。
    在eclipse中,author和commiter每次默认的格式为:user.email<user.email>
    user.email和user.email在git config中定义。
    git config有全局配置和当前仓库配置之分。
    当“当前仓库中的git config未定义user.email和user.email”时,则取全局git config中的user.email和user.email。
    当“当前仓库中的git config已定义user.email和user.email”时,则取当前仓库git config中的user.email和user.email。
    eclipse中配置全局git config配置


    eclipse中配置当前仓库git config配置


    测试
    创建两个项目:test、test_global
    创建两个项目:gitstore_test、gitstore_global
    test项目放到gitstore_test仓库中
    test_global项目放到gitstore_global仓库中
    gitstore_test仓库设定git config,参见上面“eclipse中配置当前仓库git config配置”中截图
    gitstore_global仓库未设定git config,使用全局git config配置,参见上面“eclipse中配置全局git config配置”中截图
    test项目提交时author和commiter


    test_global项目提交时author和commiter

  • 相关阅读:
    应用服务&领域服务
    Net程序调试
    node.js爬虫
    Amazon AWS S3 操作手册
    Spring MVC的异步模式DefferedResult
    mysql解决datetime与timestamp精确到毫秒的问题
    更改MySQL数据库的编码为utf8mb4
    MySQL中的表中增加删除字段
    Sublime Text 全程指引 by Lucida
    自定义多状态高仿应用下载百分数view
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13317407.html
Copyright © 2011-2022 走看看