官网如是: https://www.jetbrains.com/help/pycharm/undo-changes.html Undo the last commit PyCharm allows you to undo the last commit in the current branch (i.e. HEAD): Open the Version Control tool window (Alt+9) and switch to the Log tab. Select the last commit in the current branch and choose Undo Commit from the context menu. In the dialog that opens, select a changelist where the changes you are going to discard will be moved. You can either select an existing changelist from the Name drop-down list, or specify the name of a new changelist (the commit message is used by default). Select the Set