The eclipse git submission code Author is displayed as: Administrator

1. Problem description

When eclipse submitted the git code, it was found that the submitted user was not what he wanted, as shown in the figure below, which is not very friendly.

Two, the solution

Method 1: It is relatively simple and rude to change the configuration file directly, but the only disadvantage of being fast is that each project needs to be changed once, which is a temporary method.

Step 1: Find the config in the .git folder of the corresponding project

In the second step, add this paragraph

[user]
name = the name you want
email = fill in your own email

The third step is to restart eclipse and you're done!

Method 2: In fact, it is not a troublesome thing for code farmers, as long as the website is ok, after the modification, it will be done once and for all, and my mother will no longer worry about my submitting mistakes.

Step 1: Go to the git official website ( Git - Downloads ) to download the git of the corresponding system

The second step is to run the git cmd terminal tool to execute the following command

git config --global user.name 你的名字   
git config --global user.email 你的邮箱

The third step is to restart eclipse to get it done

Guess you like

Origin blog.csdn.net/m0_37506254/article/details/125235620