Article From:

First of all, we can install Git software according to the instructions on Git’s official website. This article does not cover how to install the software, because installing the software is a simple and boring operation without technical content. I really don’t want to write it. You can go directly to Git’s website: https://git-scm.c.OM / Check the installation method, or Baidu (Google) for other students’reference answers. Here, I recommend that students go to the official website to check and try to install it by themselves. Learning to install software by themselves is just a kind of ability. Of course, I do not object to students referring to other people’s installation ideas.

Ok,Now suppose you have installed Git. How to verify it? Enter in your command line tool:

git --version

To call it, it’s important to see that the version number of the software is similar to the output “hello world” of the learning programming language. If it has a response similar to the following, the installation is successful.


If the system replies to the GIT command and cannot find it, then I can only say… Keep trying to install it, kid.

Plato said that a good beginning is half the battle. The above conversation on the command line is equivalent to asking “git, how old are you?” We must also tell it who you are after it has been named. Otherwise, won’t it fall short? So, set up our users in the following formatName and mailbox:

git config --global Your NameGit config - Global user. email your mailbox

After setting up our name and mailbox, the Git software on your computer will always be remembered. When you modify the project in the future, it will show that you changed it. You can’t help it.

Well, the most basic greeting has been called. It’s time for us to get down to business. That’s to initialize a project. Since Linux and Mac users are generally familiar with command-line tools (I think so anyway), the Windows buddies switch your characters first, and the D-players lose first.Enter D: If you want to go to E, that’s E: and so on. Then use the CD command to go to the folder you want to go to.

For example, if I want to go to the GIT folder in the developer folder on the D disk, then the whole set of input is:


I use lowercase d here to show that switching disc characters in Windows is case-insensitive. At the same time, we recommend that you use an empty folder to initialize the project, which is better for us to learn. Use Linux and Mac to create an empty folder for your buddies.Then switch to the command line tool.

After we switch to the target folder from the command line, we can use thegit initCommand to let Git initialize a Git repository for us here.


The above operation means that in the GIT folder in the developer folder of the D disk, I asked Git software to help build an empty Git project. If you want to operate on this project later, you must switch back to this folder. Because a computer can have multiple Git projectsIf you don’t specify, the devil knows which one you’re going to operate? Git software plays the role of a project manager in our project, so I will call it the Git housekeeper in the future. Now I don’t understand that it’s okay to call it that way. With the deepening of the article, you will have a deep understanding of it in the future.Understanding.

Chapter Summary:

1 – & gt”; install Git software from Git official network.
2 – & gt”; Set the username and mailbox.
git config --global Your NameGit config - Global user. email your mailbox
3 – & gt”; use the command line tool to switch to the folder where you want to save the project and initialize the GIT project.
git init
Link of this Article: Chapter 1 Project Initialization

Leave a Reply

Your email address will not be published. Required fields are marked *