Saving and Reverting Changes
When working with PyCharm, you don't need to worry about saving changed files: all changes are auto saved.
Unwanted changes can be undone at any stage of your development workflow. Any file or directory can be reverted to any of the previous states.
- When does PyCharm auto save changed files?
- Tuning the autosave behavior
- Using the Save All command
- Marking files with unsaved changes in the editor
- Saving a file under a different name
- Reverting changes
When does PyCharm auto save changed files?
Autosave is initiated by:
- Starting a run/debug configuration
- Performing a version control operation such as pull, commit, push, etc.
- Closing a file in the editor
- Closing a project
- Quitting the IDE
In fact, there is a lot more autosave triggers, and only the most important ones are mentioned above.
Tuning the autosave behavior
- Save files on frame deactivation (i.e. on switching from PyCharm to a different application)
- Save files automatically if application is idle for N seconds
Note that those are optional autosave triggers, and you cannot turn off autosave completely.
Using the Save All command
If necessary, you can initiate saving all changed files yourself. There is the Save All command for that:
Marking files with unsaved changes in the editor
When this option is on, the files with unsaved changes have an asterisk on their editor tabs.