DartVCS is a simple, Git-like version control system implemented in Dart. It provides basic version control functionality through a command-line interface.
- Initialize a new repository
- Add files to staging area
- Commit changes with messages
- View commit history
- Check repository status
- View file diffs
- Dart SDK (version 2.12 or later)
-
Clone the repository:
git clone https://github.com/qharny/dartvcs.git
-
Navigate to the project directory:
cd dartvcs
-
Install dependencies:
dart pub get
Run the application using:
dart run bin/dartvcs.dart
init
: Initialize a new DartVCS repositoryadd <filename>
: Add a file to the staging areacommit <message>
: Commit changes with a messagelog
: Show commit historystatus
: Show the current status of the repositorydiff <filename>
: Show changes in a filehelp
: Show help messageexit
: Exit the program
$ dart run bin/dartvcs.dart
Welcome to DartVCS!
Type "help" for a list of commands.
dartvcs> init
Initialized empty DartVCS repository.
dartvcs> add example.txt
Added example.txt to staging area.
dartvcs> commit "Initial commit"
Committed changes with hash: a1b2c3d4...
dartvcs> log
Commit: a1b2c3d4...
message Initial commit
dartvcs> exit
Thank you for using DartVCS!
To run the test suite:
dart test
bin/dartvcs.dart
: Main entry point of the applicationlib/dartvcs.dart
: Core functionality of the version control systemtest/dartvcs_test.dart
: Test suite
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by Git and other distributed version control systems
- Built with Dart