Answer: To include recent git history in the context when starting a fresh aider session, use the /run command with git diff, such as /run git diff HEAD~1 to include the diff of the last commit. To include diffs from multiple commits, increase the number after the tilde, e.g. /run git diff HEAD~3. Status: Confirmed Entry: tool/aider/memory-and-context/include-git-history-context Revision: 1 Digest: sha256:67d52eb9db1a85b5 (changes whenever the content changes) Timeline: Created: 2026-11-13T02:56:15Z Last changed: 2026-11-13T02:56:15Z Last verified: 2026-11-20T11:42:25Z Next check: 2026-11-21T11:42:25Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of command | /run git diff HEAD~1 | [1] | 2026-11-20 multiple commits command | /run git diff HEAD~3 | [1] | 2026-11-20 commits shown | last three commits | [1] | 2026-11-20 alternative method | aider --read v1-v2-changes.diff | [1] | 2026-11-20 not working command | /git | [1] | 2026-11-20 Sources: [1] Aider. "aider.chat/docs/faq.html". https://aider.chat/docs/faq.html Role: primary. Accessed: 2026-11-20T11:42:25Z Quote: "Use the /run command with git diff to show recent changes: /run git diff HEAD~1" (Supports: command) Quote: "To include diffs from multiple commits, increase the number after the tilde: /run git diff HEAD~3" (Supports: multiple commits command) Quote: "This will show changes from the last three commits." (Supports: commits shown) Quote: "$ aider --read v1-v2-changes.diff" (Supports: alternative method) Quote: "The /git command will not work for this purpose, as its output is not included in the chat." (Supports: not working command) Published: 2026-04-25T16:45:23Z Snapshot SHA-256: 19dfe340c90f5e6090addf878d8ae65f955baacd8420e5d10030f34057460952 (captured 2026-11-13T02:56:14Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-13T02:56:15Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T11:42:25Z. No independent second source is configured for this entry Last successful check: 2026-11-20T11:42:25Z Last attempt: 2026-11-20T11:42:25Z Notes and limitations: Extracted automatically from a single official source (section "How do I include the git history in the context?"). Related: https://latestn.com/tool/aider/memory-and-context/repo-map-context How does Aider use a repository map to provide context to the LLM? https://latestn.com/tool/aider/memory-and-context/set-ollama-context-window-size How do I set the context window size for Ollama models in Aider? https://latestn.com/tool/aider/models/accepts-settings-compatibility Which reasoning models does Aider support and how does accepts_settings work? https://latestn.com/tool/aider/memory-and-context/add-all-files-to-chat How do I add all the files to the chat in Aider? https://latestn.com/tool/aider/memory-and-context/code-context-problem What problem does Aider's repo map solve for code context? https://latestn.com/tool/aider/memory-and-context/ctags-repo-map How does Aider use ctags to build a repo map for code context? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T02:56:15Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/aider/memory-and-context/include-git-history-context/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/aider/memory-and-context/include-git-history-context POST: https://latestn.com/dispute/tool/aider/memory-and-context/include-git-history-context with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/aider/memory-and-context/include-git-history-context?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I include the git history in the context in Aider? Revision 1, last verified 2026-11-20T11:42:25Z. https://latestn.com/tool/aider/memory-and-context/include-git-history-context (accessed 2026-11-21T10:00:03Z). @misc{LatestN_tool_aider_memory_and_context_include_git_history_context_r1, title = {How do I include the git history in the context in Aider?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/aider/memory-and-context/include-git-history-context}}, note = {Revision 1; digest sha256:67d52eb9db1a85b5; last verified 2026-11-20T11:42:25Z; accessed 2026-11-21T10:00:03Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/aider/memory-and-context/include-git-history-context