This project is a Git-like version control system developed in Python.
Supports basic commands: init, add, commit, log, status, checkout, push, and also analyze for temporary analysis.
- Create a new Wit repository in any folder.
- Staging of individual files or all files in the folder.
- Create commits with messages.
- View commit history.
- Check repository status.
- Restore previous versions.
- Send code to the server with
push. - Temporary code analysis with
analyze. - Save graphs and analysis results in the
resultsfolder.
Clone or download the repository to your local machine.
Create a file named wit.bat with the following content (adjust the path):
@echo off
python C:\Users\user1\Desktop\pythonProject\wit.py %*Make sure the path to your actual wit.py file is correct.
In your Windows environment variables (System Properties > Environment Variables), add the following paths to the PATH variable:
C:\Users\user1\Desktop\pythonProject\.venv\Scripts- The folder where your
wit.batfile is saved.
This allows you to run wit from any command prompt window.
Use the following commands from your terminal:
wit init # Create a .wit folder for version control
wit add <file> # Add a file to staging
wit add . # Add all files in the current folder
wit commit -m "msg" # Create a commit with message
wit log # View commit history
wit status # Check repository status
wit checkout <hash> # Restore files from a specific commit
wit push # Send the latest commit to the server for analysis and graph generation
wit analyze # Temporary analysis only (without commit)- The
.witolder is created on the first run ofwit init. - Commits are stored in
.wit/committed. - Files waiting to be committed are in
.wit/staging. - All commit metadata is saved locally in the
data.csvfile inside.wit. - Graphs and analysis results are saved in the
resultsfolder
wit init
wit add my_script.py
wit commit -m "Initial commit with script"
wit log
wit push- Python 3.x
- Click – for CLI interface
This project was built for study and demo purposes only and is not recommended for production use.