This article mainly introduces how to use Gitthat is, the initial use of Git.
Git is an open source distributed version control system for agile and efficient handling of any project, small or large. So in the previous article, I have introduced to you in detail What is Git and Git tool installation. Friends who need it can refer to it first.
After we install the Git tool locally, how do we start using it?
Now we will introduce to you the initial use of Git tools.
First of all, we can open a folder at will, right-click the mouse, and the following marks will appear.
Here we can click Git bash here to open the command line mode of the Git tool.
Since Git is a distributed version control system, you need to fill in the user name and contact information such as email or mobile phone number as an identifier to tell Git you Who can do more with Git?
We need to use two command statements:
git config --global user.name git config --global user.phone
Enter these two statements in the Git command line and press Enter. The operation is as follows:
Here we directly entered the above two statements and set the name and number respectively. git config --global parameter, with this parameter, it means that all Git warehouses on your machine will use this configuration. Of course, you can also specify different user names and emails for a certain warehouse.
So how to check whether the username and number here are successfully submitted to Git?
We can directly execute the following command:
git config --list
git config --global user.email
The above is the detailed content of How to use Git. For more information, please follow other related articles on the PHP Chinese website!