Table of contents
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.
2. Register your own Gitee / Githhub account
This registration is very simple, just follow the steps to complete the registration.
3. Create a warehouse
Click VCS -> Share project on Gitee / Githhub in the toolbar
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.
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.
Wait a moment for the upload to complete.
Go to Gitee to see if the creation is successful, and you can see that the upload of the code has been completed.
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.
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.
Click commit under the Git toolbar.
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.
Then click push to complete the command push
Click push to complete the push.
Enter the code cloud to view, and the code modification has been completed and submitted.