Skip to content
This repository was archived by the owner on Dec 1, 2025. It is now read-only.
distil-labsPublic archive

About

gitara helps you recall git commands

Resources

Stars

5 stars

Watchers

0 watching

Forks

Repository files navigation

gitara: an SLM converting your requests to git commands

gitara

This project demonstrates how to use a fine-tuned Small Language Model to convert natural language into git commands.

It is a wrapper around our fine-tuned Small Language Model available on 🤗 Hugging Face. It's based on Llama 3.2 3B and fine-tuned using the distil labs platform to generate git commands as tool calls. Check out our blog for more details.

It will not execute any git commands! Instead, it will just print them out for you:

> gitara "how do I stage README.md for commit"
git add README.md

Installation

  1. First, make sure you have prerequisites installed:
  1. Pull the fine-tuned model from 🤗 Hugging Face:
    ollama pull hf.co/distil-labs/Llama-3_2-gitara-3B
  2. Check out this project
    git clone git@github.com:distil-labs/gitara.git
    cd gitara
  3. Finally, run:
    > uv run gitara "create and check out a new branch feat-1"
    git switch -c feat-1

You can also add --show-json flag to see the JSON output of the model's prediction:

> uv run gitara "create and check out a new branch feat-1" --show-json
# Tool call: {'name': 'git_switch', 'arguments': {'branch': 'feat-1', 'create': True}}
git switch -c feat-1

Queries to try

> uv run gitara "pull latest changes from main while rebasing"
git pull origin main --rebase

> uv run gitara "push to remote named fork on branch test-fixes"
git push fork test-fixes

> uv run gitara "I forgot to write a good commit message, can I update the last message?"
git commit --amend

> uv run gitara "abort the current rebase"
git rebase --abort

> uv run gitara "restore settings.json to what it was in HEAD"
git restore --source=HEAD settings.jso

> uv run gitara "go back to main branch"
git switch main

> uv run gitara "create and check out a new feat/1 branch"
git switch -c feat/1

About

gitara helps you recall git commands

Resources

Stars

5 stars

Watchers

0 watching

Forks

Contributors

Languages