Working with Git in the IDE
We have already gone through some of the Git workflows in PyCharm. In Chapter 2, Installation and Configuration, we used PyCharm to clone the sample code repository for this book. Since we’ve covered cloning, we won’t do it again. Instead, let’s consider all we did manually a moment ago:
- We used
git init
to initialize a new local repository. - We made a change to our code.
- We used
git add
to add the changes as staged files in preparation for a commit. - We committed our changes to the local repository.
- We pulled from the remote to make sure we have the latest code on this branch and that no conflicts exist between what we have in our working copy and what exists on the remote. The remote could have recently changed owing to some other developer pushing their changes.
- Finally, we pushed our changes to the remote.
This list represents the most basic workflow for capturing and managing revisions on a project...