Features Tutorials

New VCS Features in PyCharm 2020.1

The Version Control System support in PyCharm has been revamped with a new and improved commit workflow as well as an interactive rebasing option. This means, that it gives you more control over the way you commit your changes.

New Commit Tool Window

[Blog] New VSC commit Window

There are a couple of changes that are noteworthy. Now, when you commit, it no longer opens up a dialog box (although if you like the old way of doing things, you can keep it that way). Instead, what you see is the commit panel. The commit panel keeps track of all the changes that you have made in your versioned files.

This change from a non-modal panel makes small meaningful commits easier; this makes commits far easier to summarize. This change does not remove any of the functionality that the previous modal-commit window had. This means, committing, adding or removing files, having files versioned or ignored as well as managing remotes are are functionalities that are still present.

Interactive Rebase

[Blog] Interactive Rebase

With the new non-modal commit window, it is quite possible that one will make quite a few commits. In order to make sure that you have a clean commit history before pushing, the new Interactive Rebase feature offers a way to clean up your commit history with ease.

The Interactive Rebase feature is a UI on top of git’s existing rebase functionality that makes it easier to change one’s commit history. This means, that you can squash, fixup, drop and reword your commits.

[Blog] Fixup

A squash allows one to combine multiple commits into one while retaining the messages of the commits that have been combined.

[Blog] Squash

A fixup allows one to combine multiple commits into one. It is very similar to squashing commits but different in one particular aspect, which is that when squashing commits, the final commit will include the commit messages of all the commits that have been squashed into it. However, with a fixup, the other messages of the commits are discarded.

Dropping and rewording are self-explanatory. A drop removes the commit and its corresponding changes entirely. A reword changes the message of a particular commit.

Rebasing changes the history of one’s commits, so one must be careful when pushing a rebased branch to the origin; especially a branch that changes often like the master branch of a repository.

image description