Pycharm: pull warehouse code through git and create project environment

1. Use pycharm to open an empty folder

  1. Using the menu bar: In PyCharm's menu bar, select the "File" menu, then select the "Open" or "Open Folder" option. In the dialog box that pops up, browse the file system and select the folder to open.

  2. Using the toolbar: In PyCharm's toolbar, you can find an "Open" button (usually a folder icon). After clicking this button, a file selection dialog box will pop up, select the folder to open.

  3. The way to use the right-click folder: right-click to open as shown in the figure below

Second, view the generated files

 

3. Test the git environment

  1. Make sure you have Git installed on your computer and add it to your system's environment variables.

  2. Open PyCharm, open your project, and make the following settings.

 4. How to access the remote warehouse

5. Empty the project folder

 Six, view git display

 Seven, configure the project environment

  1. Open PyCharm and select "File" > "Settings" in the top menu bar.
  2. In the settings window, select "Project: <Your Project Name>" (project name) > "Python Interpreter" (Python interpreter).
  3. In the upper right corner of the Python Interpreter Settings page, click the gear icon and select "Add".
  4. In the window that pops up, select "Virtualenv Environment".
  5. Select "New environment" in the drop-down menu.
  6. In the "Location" field, enter the path to the directory where you want to create the virtual environment. You can manually select or enter a directory path.
  7. In the "Base interpreter" field, select the interpreter you wish to use as the base interpreter for the virtual environment. You can select an installed Python interpreter or manually specify the path to the Python interpreter.
  8. Click "OK" to complete the process of creating the virtual environment.

After completing the above steps, PyCharm will create a new virtual environment in the specified directory and set it as your project's interpreter. You can use this virtual environment in your project to install and manage dependencies.

Eight, the application of virtual environment

 Nine, switch branch

10. Upload code

 

Guess you like

Origin blog.csdn.net/weixin_43431593/article/details/131005872