Setting your username in Git

Git uses a username to associate commits with an identity. The Git username is not the same as your GitHub username.

You can change the name that is associated with your Git commits using the git config command. The new name you set will be visible in any future commits you push to GitHub from the command line. If you'd like to keep your real name private, you can use any text as your Git username.

Changing the name associated with your Git commits using git config will only affect future commits and will not change the name used for past commits.

Setting your Git username for every repository on your computer

  1. Open Git Bash.

  2. Set a Git username:

    $ git config --global user.name "Mona Lisa"
  3. Confirm that you have set the Git username correctly:

    $ git config --global user.name
    > Mona Lisa

Setting your Git username for a single repository

  1. Open Git Bash.

  2. Change the current working directory to the local repository where you want to configure the name that is associated with your Git commits.

  3. Set a Git username:

    $ git config user.name "Mona Lisa"
  4. Confirm that you have set the Git username correctly:

    $ git config user.name
    > Mona Lisa

git config user.name的更多相关文章

  1. git config 配置

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

  2. 学习git config配置文件

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

  3. git config命令使用

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

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

  5. [译]git config

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

  6. git config proxy

    $ export http_proxy=http://proxy.ip.ad.ress:portnumber/ $ export https_proxy=http://proxy.ip.ad.ress ...

  7. [git]解决:git config --global push.default matching

    解决:git config --global push.default matching 这个警告的意思是:需要设置默认push的分支,所以设置好全局push的默认分支就好了.命令如下: 在有git目 ...

  8. git config配置文件

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

  9. git config(转载)

    From:http://www.g2w.me/2013/10/cache-github-credential-for-https-repository/ http://openwares.net/li ...

  10. [Practical Git] Configure global settings with git config

    You can set up global "git config" settings that apply to all git projects on your system. ...

随机推荐

  1. java通过下划线数字字面量增加可读性:10_00_00表示100000

    用法 int x1 = 2_014; // Underscore in deciaml format int x2 = 2___014; // Multiple consecutive undersc ...

  2. ue4 优化建议与经验

    转自:https://dawnarc.com/2016/12/ue4%E4%BC%98%E5%8C%96%E5%BB%BA%E8%AE%AE%E4%B8%8E%E7%BB%8F%E9%AA%8C/ 内 ...

  3. SpringBoot 跨域 Access-Control-Allow-Origin

    跨域(CORS)是指不同域名之间相互访问. 跨域,指的是浏览器不能执行其他网站的脚本,它是由浏览器的同源策略所造成的,是浏览器对于JavaScript所定义的安全限制策略. 只要协议,子域名,主域名, ...

  4. 2017ACM/ICPC广西邀请赛 1007 Duizi and Shunzi

    Duizi and Shunzi Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) ...

  5. Theano入门

    由于自己的一个小项目需要Theano部分的开源代码,所以学习一下并记录入门的经典网站. 入门中文博客:https://blog.csdn.net/hjimce/article/details/4680 ...

  6. Java基础之(四)HashMap(jdk10)

    JDK1.7以前的HashMap jdk1.7中,当冲突时,在冲突的地址上生成一个链表,将冲突的元素的key,通过equals进行比较,相同即覆盖,不同则添加到链表上,此时如果链表过长,效率就会大大降 ...

  7. Hbase面试题

    hbase的特点 )hbase适合存储海量数据,是一个分布式的,基于列式存储的数据库,基于hadoop的hdfs存储,zookeeper进行管理. )hbase 适合存储半结构化或非结构化的数据,对于 ...

  8. Java开发笔记(一百二十四)AWT绘图操作

    前面介绍了如何使用画笔在控件上展示图像,可是图像来源于磁盘图片,无法即兴绘制个性化的图案.所幸画笔工具Graphics不仅能够描绘图像,还支持绘制常见的几何形状,也支持绘制文本字符串,除了绘制图像用到 ...

  9. Python开发之规范化目录

    13.规范化目录 规范目录优点: 可读性高 加载快 查询修改简 规范化目录结构 (1) start.py文件:首要配置启动文件,运行run()就可以执行项目 #start import sys imp ...

  10. String和Irreducible Polynomial(2019牛客暑期多校训练营(第七场))

    示例: 输入: 4000010010111011110 输出: 00001001 0111 01111 0 题意:给出一个只含有0和1的字符串,找出一种分割方法,使得每个分割出的字符串都是在该字符串自 ...