zoukankan      html  css  js  c++  java
  • [技术学习] Git 常用命令

    GIT Config

    设置global 信息

    //Note: if not use global , will set the score in only this repo . 
    git config --global user.name "Tony Ben"
    git config --global  user.email "tony.ben@calix.com"
    
    // get git info
    git config -l

    // add additinal configure
    git config [--local|--global|--system] --add section.key value(默认是添加在local配置中)
    // get configure
    git config [--local|--global|--system] --get section.key(默认是获取local配置中内容)
    // delete
    git config [--local|--global|--system] --unset section.key

    #Show ALL Configure information

    meteor@cdc-cloud17:~/code_base/common/csc_api_ms$ git config -l
    user.email=tony.ben@calix.com
    user.name=Tony Ben
    core.repositoryformatversion=0
    core.filemode=true
    core.bare=false
    core.logallrefupdates=true
    remote.origin.url=ssh://git@stash.calix.local:7999/ccl/csc_api_ms.git
    remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
    branch.develop.remote=origin
    branch.develop.merge=refs/heads/develop
    branch.prod.remote=origin
    branch.prod.merge=refs/heads/prod
    branch.stage.remote=origin
    branch.stage.merge=refs/heads/stage

    #Show Only Global Infomation
    meteor@cdc-cloud17:~/code_base/common/csc_api_ms$ git config --global -l
    user.email=tony.ben@calix.com
    user.name=Tony Ben

    #Show Only Local Information
    meteor@cdc-cloud17:~/code_base/common/csc_api_ms$ git config --local -l
    core.repositoryformatversion=0
    core.filemode=true
    core.bare=false
    core.logallrefupdates=true
    remote.origin.url=ssh://git@stash.calix.local:7999/ccl/csc_api_ms.git
    remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
    branch.develop.remote=origin
    branch.develop.merge=refs/heads/develop
    branch.prod.remote=origin
    branch.prod.merge=refs/heads/prod
    branch.stage.remote=origin
    branch.stage.merge=refs/heads/stage

  • 相关阅读:
    Mysql之正则匹配
    定时任务之elastic-job概述
    清晰讲解LSB、MSB和大小端模式及网络字节序
    极光消息推送多环境配置
    基于TSUNG对MQTT进行压力测试-测试结果
    基于TSUNG对MQTT进行压力测试-基础概念温习
    阻塞式/非阻塞式与同步/异步的区别
    干货!Jenkins下配置findbugs、pmd及checkstyle实现代码自动检测
    jar包
    java环境变量及Eclipse自动编译问题
  • 原文地址:https://www.cnblogs.com/tben/p/14066973.html
Copyright © 2011-2022 走看看