In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Introduction to vscode
VSCode is a lightweight editor released by Microsoft, which uses the same UI interface as VS, and the experience of front-end development can be optimized with appropriate plug-ins.
Layout: on the left is the file manager that shows all the files and folders to be edited, followed by Explorer, search, GIT, debugging, plug-ins, and on the right is the editing area of the open file, up to three editing areas can be opened to the side at the same time. If git is not installed locally for the first time, you will be prompted to install git first, and then restart vscode.
The most convenient way to use git is, for example, to open vscode at home after the company has written a lot of code, you only need to click pull to synchronize it all. Isn't it convenient. After all, I used to copy it home with a U disk or save it to the cloud disk and download it.
What I use here is the code hosted by the domestic code cloud, and the github can't be understood in English.
Because vscode has git management function, you only need to learn a little about the operation of git.
Download 'msysgit'' on the home page and install it on your computer, otherwise the git in vscode will not work. After the installation is completed, Git Bash is mainly used to operate.
1. Put the code in the code cloud
Create a new warehouse in the code cloud. After completion, there will be a command tutorial in the code cloud. Just follow the above and use the tutorial in the code cloud.
Git global settings:
Git config-global user.name "ASxx" git config-global user.email 123456789@qq.com
Create a git repository:
Mkdir wapcd wapgit inittouch README.mdgit add README.mdgit commit-m "first commit" git remote add origin https://git.oschina.net/name/package.gitgit push-u origin master
Already have a project?
Cd existing_git_repogit remote add origin https://git.oschina.net/name/package.gitgit push-u origin master
Here are the detailed local steps:
1. Open your project folder with vs
2. Configure git
Open Git Bash and enter the following command
If you haven't entered the global configuration, enter the global configuration first.
Git global settings:
Git config-global user.name "ASxx" git config-global user.email 123456789@qq.com
Then start to configure the submission code to Ciyun.
Cd d:/wamp/www/mall360/wap / / first specify to your project directory git inittouch README.mdgit add README.mdgit commit-m "first commit" git remote add origin https://git.oschina.net/name/package.git / / use your warehouse urlgit push-u origin master / / to submit to your warehouse
Normally, after the above command is executed, there will be a hidden .git folder in the local folder, and there should be a README.md file in your repository in the cloud.
3. Submit the code to the warehouse in vscode
Go back to vs code and open the git workspace and you will see all the code displayed here.
Click the + sign to submit all files to the staging area.
Then open the menu and select-- submit the temporarily saved
Then press the prompt to enter a message in the message box, and then press ctrl+enter to submit
Then put all the temporary code on the push cloud
After clicking, it will pop up and ask you to enter the account password and enter the account password of your hosting platform.
If nothing goes wrong, your entire project will be submitted to the cloud.
Every time you update the code in vs, you have to enter the account password. For convenience, you can configure the account to let GIT remember the password.
Git config-- global credential.helper store / / enter this command in Git Bash
4. Synchronization code
Here we talk about the use of modifying the code and submitting it to the cloud to synchronize with the local code and the cloud.
Open any file and add a comment
You can see that the git icon has a prompt. If you open the git workspace, you can see that this file has been modified.
Then click the + sign on the right to save him temporarily.
Then enter the message in the message box and press ctrl+enter to submit it for temporary storage
Click push to submit again, and the code will be submitted to the cloud.
Open the yard cloud and you can see it.
Pull usage
For example, when you modify the code at home and submit it to the cloud, when you return to the company, you only need to use vscode to open the project and click pull in the menu to synchronize it.
5. Clone your project locally
I want to change the code when I get home, but what if the computer doesn't have a file? Look down
First of all, your computer still has vscode and GIT, and then use git to execute the above global configuration again, as follows
Git config global user.name "ASxx" git config-global user.email "123456789@qq.com" git config-global credential.helper store
Then open Git Bash and enter the following command
Cd d:/test / / specify the storage directory git clone https://git.oschina.net/name/test.git / / the address of your warehouse
Download is successful, and then you can use vscode to open the project to modify, and the steps to submit after modification are the same as above: hold-submit-push submit to the cloud and ok.
The above is the whole content of this article, I hope it will be helpful to your study, and I also hope that you will support it.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.