In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
I originally thought that such tutorials must be full of Netflix. Today, I used the Git function of VS Code for the first time. I went through all the Chinese tutorials, but none of them was reliable. So he started to write an article.
Please make sure that you have installed the latest VS Code. http://code.visualstudio.com/
Please make sure that the latest version of Git is installed. Https://git-scm.com/download . Git is installed in the environment variable to ensure that any path is accessible.
Reference link: https://code.visualstudio.com/Docs/editor/versioncontrol
VS Code integrates Git functions and supports basic git commands, which makes it easy to submit and retrieve code during the development process.
1.1 initialization
First, let's create a folder called gittest, which is certainly not in git's version control management.
Open this folder with VS Code and click the git icon on the left.
We can see the button to "initialize the GIT repository", click.
After initialization, the first thing we see is that all the current files are displayed in the git column, with four changes.
All or individual files can be temporarily saved or cleaned up.
There are submit and refresh buttons at the top, and more options in the drop-down menu. Going back to our file, the operation just created a .git folder with all the configuration files for the current repository, as shown in the following figure.
So far we have created a code repository locally, so let's take a look at VS Code's git functionality.
Git output
We can select the git output from the hidden menu so that each of our actions will be displayed in the output area, making it easy for us to view the corresponding git command.
Submit and save
The first step in submitting and saving is to temporarily save the file.
The second step is to enter the submission information.
Step 3 then use the submit button on the status bar to commit all changes.
List of git commands
Ctrl+shift+P, type git, and you will see all the git commands supported by VS CODE.
Undo operation
Enter Undo Last Commit to undo the last operation. Enter Unstage to undo the temporary storage.
Branch
Enter Branch to create a branch of the current content. You need to enter a branch name when creating a branch.
Checkout
After you create a branch, you can pull specific branch content using the checkout command.
Conflict merging
VS Code detects file conflicts and uses the
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.