Revisions - VS Code Extension
Revisions is a powerful VS Code extension that helps you maintain a history of your code changes, allowing you to create, view, compare, and restore previous versions of your files.
Features
- Automatic Snapshots: Automatically creates a snapshot of your file every time you save.
- Manual Snapshots: Ability to manually create a snapshot at any time.
- View History: See a list of all revisions for a file.
- Compare Revisions: Compare any revision with the current file state.
- Restore Revisions: Easily restore your file to any previous revision.
- Cleanup Old Revisions: Remove old revisions to manage storage.
Installation
- Open VS Code
- Go to the Extensions view (Ctrl+Shift+X or Cmd+Shift+X on macOS)
- Search for "Revisions"
- Click Install
Alternatively, you can download the .vsix file and install it manually:
- Download the .vsix file
- In VS Code, go to the Extensions view
- Click on the "..." at the top of the Extensions view and select "Install from VSIX..."
- Select the downloaded .vsix file
Usage
Creating a Snapshot
- Snapshots are automatically created when you save a file.
- To manually create a snapshot, use the command palette (Ctrl+Shift+P or Cmd+Shift+P on macOS) and search for "Revisions: Create Snapshot".
Viewing Revision History
- Open the file you want to view the history for.
- Open the command palette and search for "Revisions: View History".
- A new panel will open showing all revisions for the file.
Comparing Revisions
In the revision history view, click the "Compare" button next to any revision to compare it with the current file state.
Restoring a Revision
In the revision history view, click the "Restore" button next to the revision you want to restore.
Cleaning Up Old Revisions
- Open the command palette and search for "Revisions: Clean Up Old Revisions".
- Enter the number of days. Revisions older than this will be removed.
Configuration
You can configure the maximum number of revisions to keep per file:
- Go to File > Preferences > Settings (Code > Preferences > Settings on macOS)
- Search for "Revisions"
- Adjust the "Max Revisions Per File" setting
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License.
Support
If you encounter any problems or have any suggestions, please open an issue on the GitHub repository.
Enjoy using Revisions!