How to configure Git?

Hello It’s Ray!

Today I’m going to share with you how to configure basic information of Git.

Okay now let’s add a new code on our example file as follows:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>First example</title>
</head>
<body>
<p>This is the first example</p>
<p>We add a new paragraph on the first example</p>
<p>This is the example commit for git commit -am</p>
<p>This is the example1 for git configuration</p>
</body>
</html>

Git commit -am “Before configuration”

Git log

Take a look on the image above, which shows the author information of this commit in current configuration.

Now we add another description in the example1.html file as follows:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>First example</title>
</head>
<body>
<p>This is the first example</p>
<p>We add a new paragraph on the first example</p>
<p>This is the example commit for git commit -am</p>
<p>This is the example1 for git configuration</p>
<p>This is the example after git configuration</p>
</body>
</html>

Let’s configure the user information.

enter the following code.

Git config --global user.name Ray
Git config --global user.email example@email.com

Please fill in yours in “Ray” and “example@email.com

And then enter:

Git commit -am “after configuration”

Git log

Through image above we could see that we’ve successfully configured the user information.

Let me explain further. We use –global to configure, so it applies to ALL, simply speaking, all of the repositories in your computer are applied with this setting. We could also configure a local setting, which means the configuration only apply to local repository. We will talk about it further!

Let’s call it a day. See you guys!

Send email via AWS SES in Laravel Deploy multiple projects on AWS

Comments

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×