Basic Git Operations

This page documents some of the basic Git activities.

Creating and Sharing a Project

  1. Create your project, and its local Git repository, as per the instructions.
  2. Log in to GitHub and create a new repository.
  3. From the text instructions for importing an existing project, copy the git remote add line and run it in a terminal (the PyCharm terminal works great!).
  4. Push your code from the local repository to the GitHub repository

Checking Out a Project

If one of your teammates has created the project, you can check it out by using the ‘Check out project from version control’ option in IntelliJ.

  • Give it the clone URL (HTTPS version, not SSH, unless you know what you're doing) to check out the repository.
  • Double-check the Project Interpreter in PyCharm's settings, make sure it's using your virtual environment.

Then you're good to go!

Integrating Changes

  1. Commit all of your work.
  2. Try to push — if it succeeds, great!
  3. Choose ‘VCS’ → ‘Git’ → ‘Pull’
  4. Default options are generally OK
  5. Resolve any conflicts (carefully!)
  6. Test your code
  7. Push!