Merge pull request #1762 from fry69/git-history-tip

This commit is contained in:
paul-gauthier 2024-09-26 14:44:07 -07:00 committed by GitHub
commit 17108c4328
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -106,6 +106,24 @@ The repo map is usually disabled for a good reason.
If you would like to force it on, you can run aider with `--map-tokens 1024`.
## How do I include the git history in the context?
When starting a fresh aider session, you can include recent git history in the chat context. This can be useful for providing the LLM with information about recent changes. To do this:
1. Use the `/run` command with `git diff` to show recent changes:
```
/run git diff HEAD~1
```
This will include the diff of the last commit in the chat history.
2. To include diffs from multiple commits, increase the number after the tilde:
```
/run git diff HEAD~3
```
This will show changes from the last three commits.
Remember, the chat history already includes recent changes made during the current session, so this tip is most useful when starting a new aider session and you want to provide context about recent work.
## How can I run aider locally from source code?
To run the project locally, follow these steps: