Ask a question about git username and password
PHPz
PHPz 2017-05-02 09:35:34
0
2
627

Use in git
[~]$ git config --global user.name "lubin"
[~]$ git config --global user.email lubin.z@gmail.com
What is the use of these two commands to set the user name and email address? Do the username and email have to be the same as those on github?

PHPz
PHPz

学习是最好的投资!

reply all(2)
黄舟

The first question, this link: user information

The first thing you should do after installing Git is to set your username and email address. It’s important to do this because every Git commit will use this information, and it will be written to every commit you make and cannot be changed

Again, if you use the --global 选项,那么该命令只需要运行一次,因为之后无论你在该系统上做任何事情, Git 都会使用那些信息。 当你想针对特定项目使用不同的用户名称与邮件地址时,可以在那个项目目录下运行没有 --global option command to configure.

As for the second question, they don’t necessarily need to be the same. Originally, git and github are not the same thing

世界只因有你

This information is actually not very important... = =Okay, it is very important.

This is your self-reported house number. It will be displayed in the GitHub repository who commits each time (I remember correctly!? Well, I don’t really care about this, but you have to pay attention to it when collaborating with multiple people. It may cause permission problems in some places)
In addition, github is just a popular code hosting warehouse. Github is a website that provides warehouses. And git is a version control system, at the same level as SVN. There is a coding.net website similar to github in China.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template