PyVersionControl is a lightweight, Python-based version control system designed to track changes in your project files. It provides basic version control functionality by allowing you to commit changes, track new files, and view commit history. This system is ideal for projects where a full-featured version control system might be too complex.
This project is a work in progress, aiming to demonstrate the concept of building a version control system using Python.
- Version Control System Creation: Initialize a version control system in a specified directory.
- Change Tracking: Track changes in files within the directory and record commit messages.
- New File Detection: Detect and commit new files added to the directory.
- Commit Message Retrieval: View all commit messages in the version history.
Set up the version control system in a test folder:
python bit.py --path C:\Users\adnan\Desktop\Test_Folder
Commit changes with a custom message:
python bit.py --path C:\Users\adnan\Desktop\Test_Folder --command commit-"Initial commit"
List all versions of the files:
python bit.py --path C:\Users\adnan\Desktop\Test_Folder --command list_versions
-
Initialize the repository:
python bit.py --path C:\Users\adnan\Desktop\Test_Folder
-
List all versions:
python bit.py --path C:\Users\adnan\Desktop\Test_Folder --command list_versions
-
Commit changes:
python bit.py --path C:\Users\adnan\Desktop\Test_Folder --command commit-"Added new feature"
Based on the main logic of PyVersionControl, additional functionalities can be implemented:
-
Rollback to Previous Version: Restore the project to a previous version by copying files from the selected version directory back to the main project directory.
-
Track Specific File Changes: Implement a feature to track changes in specific files rather than the entire directory.
-
Enhanced Commit Messages: Allow for more detailed commit messages, possibly including metadata such as the date and time of the commit, the user who made the commit, and a summary of changes.
-
Conflict Detection: Implement conflict detection to alert users when two different changes conflict with each other, potentially merging those changes or alerting the user to resolve conflicts manually.
-
Automated Backups: Schedule automated backups at regular intervals to ensure that all changes are consistently tracked.
-
Graphical User Interface (GUI): Develop a simple GUI to make the version control system more user-friendly.
For any inquiries or support, please contact me on LinkedIn: Adnan Karol