Home >Development Tools >git >How to use Git
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##As shown in the picture, you can see our internal settings Good some information. Some friends here may find that there is no mailbox set up above, but now there is an additional mailbox. This is because when I used Git before, I defined the mailbox once. By default, it will not be cleared when I use it again, and if we reset the new The old mailbox will be overwritten only when the new mailbox is added.
git config --global user.emailThrough the above simple Git operations, we can use Git tools more specifically, such as Git to create a repository wait. This article is a preliminary introduction to the use of Git. I hope it will be helpful to friends in need!
The above is the detailed content of How to use Git. For more information, please follow other related articles on the PHP Chinese website!