Home  >  Article  >  Development Tools  >  What does vscode git mean?

What does vscode git mean?

尚
Original
2020-01-11 10:25:572603browse

What does vscode git mean?

#Git is an open source distributed version control system that can handle version management of projects from very small to very large projects efficiently and at high speed. The VSCODE editor integrates git commands.

Introduction to git command:

1. Installation of git command line tool

You can directly go to the official website to download the corresponding version –>Git official website link

The 64-bit version of Windows I installed here, just click next during installation.

2. Configuration before using git (very important)

We need to configure the git username and email (information that will be used for all future git submissions)

1 . Right-click on the desktop or any directory to open git bash (or directly open the CMD command line)

2. Type the command

git config --global user.name xxxxx
git config --global user.email xxx@x

3. Basic git commands

git init

Create a git warehouse in the current folder. The most intuitive thing is that there is an extra .git folder in the current directory (you need to show the hidden folder to see it under Windows, and you need to show it under Linux) ls -a).

Note: All commands here can be added with –help in the command line to pop up the official help document, such as git add --help to view the usage instructions of git add.

git add

Add files from the current folder to the staging area to facilitate git tracking.

git commit -m " do what"

Submit the code from the staging area to the code repository, and the submission description is "do what"

git diff

To compare the differences in warehouses, staging areas, and working directories (there are many uses)

git reset

git reset HEAD~ is used to roll back to the last submitted version. Did two things: 1. Modified the HEAD pointer (the current version of the warehouse is rolled back to the previous version), 2. Overwritten the files of the previous version of the warehouse into the staging area to discard the last commit, (working directory, The files in the folder have not changed yet)

git log View the version submission record

Recommended related articles and tutorials: vscode tutorial

The above is the detailed content of What does vscode git mean?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn