# Obtaining Staged Changes - Lesson Overview
In this lesson, we implement the core functionality to capture Git's staged changes that will be sent to an LLM for commit message generation. The lesson demonstrates how to use Go's exec package to run `git diff --staged` command, which retrieves only the changes that have been staged for commit. We create a dedicated git package with a `StagedDiff` function that executes this command and returns the diff output as a string.
We'll demonstrate this concept by manually showing how staged changes can be copied and pasted into Claude to generate commit messages, proving that LLMs are effective at understanding code diffs and creating appropriate commit messages. By the end of the lesson, we have a working implementation that can programmatically obtain staged changes and output them, setting up the foundation for the next step where we'll integrate with Ollama to work with local LLM models.