The pycharm code is uploaded to the gitee warehouse

Table of contents

1. Preparation

two,

1. New warehouse

2. commit and push


1. Preparation

(1) Install plugins in pycharm: github, git

(2) Install git locally

two,

1. New warehouse

First open your own local project in pycharm, if not configured, the main interface should be like this

(1) Open pycharm and enter the settings page, Pycharm=>setting=>plugins, check whether the gitee plugin is installed on pycharm.

If not, search for gitee in the search box and click installed to download. After the download is complete, click ok.

After the installation is complete, there is gitee under version control or after the download and installation is successful, you can see Gitee, click the ➕ sign on the right, and then click Log ln via Gitee....,

After clicking, add Gitee account binding, and then click ok, the authorization page will pop up on the browser page, click "Agree Authorization",

After clicking "Agree to authorize", wait for a while, and you can see success on pycharm.

(2) Find VCS in the menu bar of the pycharm main interface, and check the Share Project on Gitee option inside, indicating that you have successfully installed it. Click,

Share Project on Gitee pops up a pop-up box. After clicking share, the current project will be uploaded to gitee and a warehouse will be generated.

  • warehouse name
  • the branch
  • describe

Choose to share to gitee, you can synchronize the code to gitee, and you can see the newly added warehouse on gitee.

(3) Since the warehouse has just been created, it is the first submission at present, and pycharm automatically pops up a page, as follows,

After clicking "Add", wait for a while, the following words will appear in the lower left corner of the pycharm page,

 Then, go to your gitee account to check the warehouse and find that the code has been submitted.

 

2. commit and push

Git principle: local workspace -> temporary storage area -> local library -> Gitee

  • git status View the changed files in the local workspace
  • git add a.py submits the file to the temporary storage area
  • git commit -m "memo" Add annotations and submit the temporary storage area files to the local library
  • git push submits the local library to the remote gitee warehouse
  • git log view git log

pycharm notes:

  • Colorless py file: Indicates that this file has been submitted to the local repository - the next step is to push to gitee
  • Red file: Indicates that this file is in the local workspace - add it to the temporary storage area in the next step
  • Green file: Indicates that this file has been submitted to the temporary storage area - the next step is to commit to the local repository
  • Blue file: Indicates that the file has changed - the next step is to commit to the local repository

(1) Modify a file, we can see that the file is displayed in blue in the directory structure,

The file displayed in blue in pycharm indicates that the file has changed, and the next step is to commit to the local repository

(2) When you modify or delete a file and want to upload it to gitee, right-click to select the file or folder, then >git>commit file,

The commit changes pop-up box pops up, select the submitted file, add the submission instructions, click commit to submit, and submit the modified file content to the warehouse.

 

(2) After the commit submission is completed, the file will be displayed from blue to colorless in the directory structure,

Displayed as a colorless file in pycharm, indicating that the file has been submitted to the local repository - the next step is to push to gitee

Right click on the file>git>push,

A push pop-up box pops up, click push to submit, and push to the remote warehouse branch,

Wait for a while, the following words will appear at the bottom of the pycharm page,

 

 Then, go to your gitee account to check the warehouse and find that the modification of the file has been submitted.

 

Guess you like

Origin blog.csdn.net/qq_45956730/article/details/131576743