zoukankan      html  css  js  c++  java
  • Git CMD

    命令参数

    --get

    获取指定的配置项。

    --global

    对于写选项:全局配置,将参数配置于 ~/.gitconfig 而不是仓库目录下的 .git/config。对于读选项:只从 ~/.gitconfig 文件中读取配置。

    --local

      对于写选项:将参数配置于 仓库目录下的 .git/config,这是默认的设置。

    -l, --list

      列出配置文件中的所有配置项。

    配置文件

    如果没有显示地指定 --file 选项,则有 4 个文件供 git 配置查询配置项。

    $(prefix)/etc/gitconfig

    全系统的配置文件

    ~/.gitconfig

    用户特定的配置文件,也称为全局配置文件。

    $XDG_CONFIG_HOME/git/config

    用户特定的次要的配置文件。如果 $XDG_CONFIG_HOME 没有设置或者为空,$HOME/.config/git/config 会被替代。

    $GIT_DIR/config

    仓库特定的配置文件。

    实例

    a) 设置用户名与用户邮件 ID

    $ git config --global user.name "huey"
    $ git config --global user.email "huey@example.com"

    b) 设置颜色高亮

    $ git config --global color.ui true

    c) 列出当前的配置选项

    $ git config --list

    更多

    http://git-scm.com/docs/git-config

  • 相关阅读:
    mysql调优
    面试、。。。。
    StringBuffer 和 StringBuilder 的 3 个区别
    msql查询指定日期
    Windows 路由跟踪
    Xdebug配置
    ONVIF流媒体播放流程
    Windows 8 SP1 安装StockTrader 6.1
    使用log4c问题
    xcode插件安装
  • 原文地址:https://www.cnblogs.com/huey/p/5088067.html
Copyright © 2011-2022 走看看