New VCS Features in PyCharm 2020.1

Posted on by Nafiul Islam

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.

Comments below can no longer be edited.

4 Responses to New VCS Features in PyCharm 2020.1

  1. Vladimir says:

    April 22, 2020

    Tried to move New Commit Tool Window to Bottom and it became unusable.
    Please, help me, how can I split files and commit message views vertically?

  2. Alberto says:

    April 22, 2020

    Hi, the UX seems very sleek, good work there 🙂

    I can’t find these features in my mercurial projects, that’s unfortunate because these concepts map cleanly to git equivalents, and on top of that, the evolve extension makes manipulating history simple, safe and distributed (unlike force pushes).

  3. Chris says:

    May 29, 2020

    How do I cancel a commit using this new interface. That is I bring up the commit interface and decide not to proceed with the commit at this stage. Using the previous modal dialog box you would of course just hit the cancel button

  4. Andrew says:

    June 2, 2020

    >That is I bring up the commit interface and decide not to proceed with the commit at this stage. Using the previous modal dialog box you would of course just hit the cancel button

    With the new interface, you can just close it by mouse or using shit-escape.

    >Tried to move New Commit Tool Window to Bottom and it became unusable.
    Please, help me, how can I split files and commit message views vertically?

    You can do this by enabling vcs.non.modal.commit.split.horizontal.if.no.diff.preview registry option.

    You can also disable the separate commit tool window using vcs.commit.tool.window registry option.

    To configure registry options, use **Help | Find action** to find “Registry…”

Subscribe

Subscribe for updates