zoukankan      html  css  js  c++  java
  • 如何查询修改本地git 账号(增删改查)

    最近换了一台其他同事的电脑,按照惯例,删除本地的windows凭据,然后登陆自己的git账号,本以为没问题了,可是一连几次提交代码都显示的是原先的同事的账号提交的,一脸懵逼。。。

    向大佬问其故,大佬一句话:“你查询一下本地的git账号”

    醍醐灌顶!遂作下文!

    1 查看

      1-1 查看所有账户信息

    git config --list

      1-2 查看指定账户信息

    $ git config user.name
    $ git config user.email

    2 添加

    $ git config --global user.name "yourName"
    $ git config --global user.email "your@email.com"

    3 修改

      3-1 覆盖的形式修改

    $ git config --global user.name "yourName"
    $ git config --global user.email "your@email.com"

      3-2 替换的形式修改

    $  git config --global --replace-all user.name "yourName" 
    $  git config --global --replace-all user.email "your@email.com"

    4 删除

    $ git config --global --unset user.name "yourName"
    $ git config --global --unset user.email "your@email.com"

    此文感谢https://blog.csdn.net/huangxinglian/article/details/90694361的分享

  • 相关阅读:
    CF919F A Game With Numbers
    CF1005F Berland and the Shortest Paths
    CF915F Imbalance Value of a Tree
    CF1027F Session in BSU
    CF1029E Tree with Small Distances
    CF1037E Trips
    CF508E Arthur and Brackets
    CF1042F Leaf Sets
    [HNOI2012]永无乡
    [BZOJ1688][Usaco2005 Open]Disease Manangement 疾病管理
  • 原文地址:https://www.cnblogs.com/fxwoniu/p/13804910.html
Copyright © 2011-2022 走看看