Home > Article > Development Tools > How to upload vscode code to gitee
If you are a developer, you will definitely use a code editor. Among them, VS Code is a popular open source editor that allows developers to easily write code and perform version control. At the same time, Gitee is a popular domestic code hosting platform that allows you to store code in remote warehouses and share it with others. Here's a simple guide on how to upload your VS Code code to Gitee:
Step 1: Install Git
If you don't have Git installed yet, you'll need to download and install it first . Download address: https://git-scm.com/downloads
Note: If you are using a Mac or Linux system, you can use the pre-installed Git version.
Step 2: Create a Gitee repository
If you don’t have a Gitee account yet, you need to register an account first. The specific steps are as follows:
Step 3: Clone the code locally
Before this, you need to create a directory locally and open this directory in VS Code. The specific steps are as follows:
Enter the following command to clone your Gitee repository:
git clone https://gitee.com/[username]/[repository name] .git
git clone https://gitee.com/xxx/yyy.git
Please note that at this time you need to replace Username
and Repository Name
with the actual values you created on Gitee.
Step 4: Open the locally cloned warehouse in VS Code
Step 5: Make changes in VS Code and submit the code
git add . git commit -m "commit message"
Please replace commit message
with the appropriate message.
Step 6: Push local changes to the Gitee repository
git push -u origin main
Please note that, The main
here should be replaced with the default branch name in the Gitee repository.
Summary
The above are some simple steps to upload VS Code code to Gitee. In addition, there are some other steps and techniques for more complex needs, such as how to merge branches and so on. But for most simple projects, the above steps should be enough for your needs. Hope this article can be helpful to you!
The above is the detailed content of How to upload vscode code to gitee. For more information, please follow other related articles on the PHP Chinese website!