In this section, we will study various features in PyCharm that facilitate the process of version control with Git and GitHub. As a prerequisite of this exercise, go on to your GitHub account to create a new repository to be the one associated with this current local project. You can name this repository however you like (GitTest, PyCharmVersionControlTest, or whatever).
Also note that while creating the GitHub repository, you can specify it to be private, which will prevent other people from seeing and accessing the repository—after all, this is a playground repository solely for learning purposes.
Next, either create a new Pure Python project in PyCharm and enter the following sample code into a Python script inside that project or import the Chapter05 folder from our book repository as a project into your PyCharm:
if __name__ == '__main__':
print('Hello from Version Control!')
Our goal in this section is to push this project to GitHub by walking through all the steps that we discussed previously. If at any point you are not sure what a specific command is used for, you can go back to the previous section in this chapter to learn more about Git commands. We will also be looking at the differences between the manual process and doing it via PyCharm so that the advantages of the latter option can be highlighted.