Skip to content

adnankarol/PyVersionControl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PyVersionControl: Pythonic Version Control System

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.

Features

  • 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.

Usage

Initialize the Repository

Set up the version control system in a test folder:

python bit.py --path C:\Users\adnan\Desktop\Test_Folder

Commit Changes

Commit changes with a custom message:

python bit.py --path C:\Users\adnan\Desktop\Test_Folder --command commit-"Initial commit"

List All Versions

List all versions of the files:

python bit.py --path C:\Users\adnan\Desktop\Test_Folder --command list_versions

Example Commands

  • 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"

Additional Functionalities

Based on the main logic of PyVersionControl, additional functionalities can be implemented:

  1. 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.

  2. Track Specific File Changes: Implement a feature to track changes in specific files rather than the entire directory.

  3. 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.

  4. 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.

  5. Automated Backups: Schedule automated backups at regular intervals to ensure that all changes are consistently tracked.

  6. Graphical User Interface (GUI): Develop a simple GUI to make the version control system more user-friendly.

Contact

For any inquiries or support, please contact me on LinkedIn: Adnan Karol

About

Pythonic Implementation of a Version Control System

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages