Basic Git Operations
This page documents some of the basic Git activities.
Creating and Sharing a Project
- Create your project, and its local Git repository, as per the instructions.
- Log in to GitHub and create a new repository.
- From the text instructions for importing an existing project, copy the
git remote addline and run it in a terminal (the PyCharm terminal works great!).
- 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!
- Commit all of your work.
- Try to push — if it succeeds, great!
- Choose ‘VCS’ → ‘Git’ → ‘Pull’
- Default options are generally OK
- Resolve any conflicts (carefully!)
- Test your code