This example demonstrates the basic usage of giton as a Python library.
# Install giton
pip install giton
# Initialize giton in your repository
giton init
The main.py script shows how to:
cd examples/basic
# Run directly
python main.py
# Or run with pytest for testing
pytest main.py -v
This will:
pre-commit triggerThe example is structured to work with pytest for easy integration into CI/CD pipelines:
# Run the test
pytest examples/basic/main.py::test_basic_giton_usage -v
# Run with coverage
pytest examples/basic/main.py --cov=giton -v