Skip to content

Latest commit

 

History

History
59 lines (37 loc) · 2.29 KB

File metadata and controls

59 lines (37 loc) · 2.29 KB

PyCharm & GitHub integration

Prerequisites

  • Install Git: Ensure Git is installed on your system. You can download it from git-scm.com.
  • GitHub Account: Have your GitHub account credentials ready. If you don't have a GitHub account, create one at github.com.

Setting up Git in PyCharm

  1. Open PyCharm: Start PyCharm on your computer.
  2. Access Preferences: Go to File > Settings (on Windows/Linux) or PyCharm > Preferences (on macOS).
  3. Configure Git:
    • Navigate to Version Control > Git.
    • Click the ... next to the Path to Git executable and ensure PyCharm has detected your Git installation, or navigate to it manually.
    • Click OK to save.

Version control window

Connecting to GitHub

  1. Access GitHub Settings:
    • In the same Settings or Preferences window, go to Version Control > GitHub.
  2. Add GitHub Account:
    • Click the + (Add) button.

Version Control -> GitHub

  • Use the token-based login.

Version Control -> GitHub -> Token Login

  • On the opened window select required token scopes. At this step you define what IDE can do using your token.

GitHub -> Create Token

  • Copy generated token.

Important

This is the only time you see this token, so save it if you plan to use it later somewhere else

GitHub -> Copy Token

  • Paste copied token to the Add GitHub Account popup window.

Version Control -> GitHub -> Token Login

  • Find added account at the Accounts list.

Version Control -> GitHub -> Accounts List

  • Click OK to save the account.

Tips

  • Regularly commit and push your changes to avoid losing work.
  • Frequently pull changes if you’re collaborating with others.
  • Make use of branches for features or bug fixes to maintain an organized workflow.