Metadata-Version: 2.4
Name: vcs-cli-rajarshi
Version: 1.0.0
Summary: A minimal Git-like version control system
Author: Rajarshi Datta
License-Expression: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# VCS

VCS is a small, educational, Git-like version control system written in Python.
It supports local snapshots, branches, safe checkout, and three-way merges while
keeping its on-disk format easy to inspect.

> VCS is an educational project, not a drop-in replacement for Git. The package
> is currently classified as alpha software.

## Install

```bash
pip install vcs-cli-rajarshi
```

The distribution is named `vcs-cli-rajarshi`, and it installs the `vcs`
terminal command.

For local development:

```bash
python -m pip install -e .
```

## Basic workflow

```bash
mkdir my-project
cd my-project
vcs init

vcs add app.py
vcs commit -m "Initial commit" -a "Your Name"
vcs status
vcs log
```

Branching and merging:

```bash
vcs branch feature
vcs checkout feature
# edit and commit files
vcs checkout main
vcs merge feature
```

Checkout and merge abort if they would overwrite staged changes, modified
tracked files, or colliding untracked files. A merge also aborts and lists the
paths when both branches changed the same file differently.

## Ignoring files

Create a `.vcsignore` file in the repository root. It accepts common glob-style
patterns, directory patterns, comments, and `!` negation:

```gitignore
__pycache__/
dist/
*.pyc
.env
!example.env
```

## Commands

- `vcs init`
- `vcs add <file> [<file> ...]`
- `vcs commit -m <message> [-a <author>]`
- `vcs status`
- `vcs log [-n <count>]`
- `vcs branch [<name>]`
- `vcs checkout <branch>`
- `vcs merge <branch>`

Run `vcs --help` or `vcs <command> --help` for command-line help.

## Development and release

Run the tests with only the Python standard library:

```bash
python -m unittest discover -s tests -v
```

Build and validate a release:

```bash
python -m pip install build twine
python -m build
python -m twine check dist/*
```

Test the wheel in a fresh virtual environment before publishing. To publish:

```bash
python -m twine upload dist/*
```

## Repository format

```text
.vcs/
├── objects/          # Binary-safe content-addressed objects
├── refs/heads/       # Branch references
├── HEAD              # Current branch pointer
├── config.json       # Repository metadata
└── staging.json      # Staging index
```

VCS stores file objects byte-for-byte and hashes them with SHA-1 for educational
compatibility with the basic content-addressing idea. It does not provide Git's
network protocol, pack files, hooks, tags, rebase, or cryptographic signing.
