Use Git in pycharm to upload code to Gitee/GitHub (super detailed step-by-step explanation for novice Xiaobai)

Because Gitee and GitHub are used in similar ways, this article takes uploading code to Gitee as an example, and GitHub operates similarly.

1. Download the gitee/github plugin in pycharm

pycharm: File -> Settings -> Plugins -> Search Gitee/GitHub for plugin installation

After installation, the plug-in will have a small blue arrow indicating that the installation is successful.
insert image description here

2. Register your own Gitee / Githhub account

This registration is very simple, just follow the steps to complete the registration.

insert image description here

3. Create a warehouse

Click VCS -> Share project on Gitee / Githhub in the toolbar

insert image description here

A window for creating a warehouse will appear. You can enter the name of the warehouse, whether it is public or not, a description of the warehouse, etc., and then click share to complete the creation.

Note: The first time you use pycharm to link Gitee/GitHub, you need to complete a Gitee/GitHub account confirmation here, that is, log in to your own account, and follow the steps to complete it, which is very simple.

insert image description here

3. Select the code file you want to upload

The upload code file window appears, select the code you want to upload to Gitee.
The following commit message is an upload command, which can be modified according to your own requirements.

insert image description here
Wait a moment for the upload to complete.

insert image description here

Go to Gitee to see if the creation is successful, and you can see that the upload of the code has been completed.

insert image description here

4. After modifying the code, upload it to Gitee/GitHub

You can see that the color of the code file name is black after the upload is successful.

insert image description here

After I modified the 1.py file, the 1.py file name turned blue, indicating that the code has been modified, but it has not been uploaded to the code cloud.

insert image description here

Click commit under the Git toolbar.

insert image description here

Enter the command in the command area (what kind of modification has been made), the command I entered is "The changes to 1.py", and then click commit to submit.

insert image description here

Then click push to complete the command push

insert image description here

Click push to complete the push.

insert image description here

Enter the code cloud to view, and the code modification has been completed and submitted.

insert image description here

Guess you like

Origin blog.csdn.net/weixin_45662399/article/details/132228138