History is underused context
An AI agent looking only at the current code sees the 'what' but not the 'why' or the 'recently'. Git history holds both — how the code got here and what the team is actively changing.
Tapping that history makes the agent's changes fit the project's direction instead of fighting it.
Recent commits and PRs
Recent commits and merged PRs show the current trajectory: the patterns being adopted, the refactors in progress, the conventions settling in. An agent aware of them won't reintroduce something just removed.
Pointing the agent at recent history for the area it's touching keeps it current.
Use blame before changing
git blame answers 'why is this line like this?'. Before an agent rewrites a confusing block, the commit that introduced it (and its message) often explains a constraint that must be preserved.
This prevents the classic agent mistake of 'cleaning up' load-bearing code.
Feed it selectively
Don't dump the entire git log into context — that's noise. Surface the relevant slice: recent history for the touched files, the PR that introduced the feature, the blame for the lines in question.
Relevant history beats exhaustive history, same as with code.
Write history worth reading
Clear commit messages and PR descriptions turn your history into usable context for both agents and teammates. 'Fix bug' tells nobody anything; a message stating what and why is reusable knowledge.
Good git hygiene is, in effect, free context engineering.