Copyright Notice:Blog.csdn.net/qq_35203425…

The problem

Recently, I wanted to submit my python project to Github. I found many tutorials on how to set up pyCharm, but they only covered part of it.

If you want to submit your project to Github, there are several ways to do it. The most common way is to use Git. You can also download github Desktop, a GUI interface tool, and submit your project with a click of the mouse.

  • Git can be downloaded at git-scm.com/downloads
  • GitHub website: github.com/

Git installation is simple, based on the default installation, just click Next. If you don’t have a Github account, you can register one.

Pycharm set in the

In PyCharm, you need to configure the Github account name and password as well as the repository to submit

File-settings Type git in the search box



As shown in the image above, github will appear in the search box, and then enter your Github username and password next to it. You can click “Test” to test. If “Connection successful” appears, it means that the Connection is successful. (Attention!! Use SSH (SSH), then click Apply, and you’re done.

Set up git

Git is set up so that PyCharm can find out where git is installed locally.



Setting up a local repository

First, the local project directory needs to be initialized as a Git repository, you need to use Git, the first time to use Git to submit the project need to set their own user name and mailbox (this user name and mailbox are the same as the above step), open CMD, use the command

git config --global user.name [username]git config --global user.email [email]1Copy the code

You then need to initialize local folders for the warehouse, the method is: open the CMD, type the command: git init, initialize the folder for the warehouse, (if there is a project under the folder, can put the project to move to another folder, and then the command git init initialize the project folder for the warehouse, and then copy the project). After initialization, you will find that there is a.git folder in this folder.

Configure the warehouse commit in PyCharm

Click VSC — Import into Version Control — Share Project on Github



Because there is a default name, I have built a repository here, so the following exists



Just click On Share and go to your Github to see the project.