paul-gauthier / aider

aider is AI pair programming in your terminal
https://aider.chat/
Apache License 2.0
16.19k stars 1.51k forks source link

Automate git merge conflict resolution #800

Open tiagoefreitas opened 1 month ago

tiagoefreitas commented 1 month ago

Issue

This would be awesome to merge branches or PRs. I would just approve the pre-made merge in the vs code merge editor, if that's possible (save merge decisions in VS Code compatible format without actually commiting the merge).

The LLM would resolve the conflicts based on the functionality of the commits messages where history diverged and code understanding.

For example, I have a branch where a bunch of apis handlers were refactored to use TRPC server actions and some auth middleware upgrades. But that branch has diverged a lot in terms of functionality. There are conflicts, but understanding that branch and all its commits purpose, you know you want to keep the functionality of the main branch and just use the merge to refactor the way the apis are implemented, not its content, except the auth.

Version and model info

No response

paul-gauthier commented 1 month ago

Thanks for trying aider and filing this issue.

If you have a file full of merge conflicts, you might try adding it to aider and asking it to fix them?

tiagoefreitas commented 1 month ago

good idea, if that works then just need a way to auto add all conflict files to aider context

a dedicated tool could have better UX because i would like to review and approve each resolution step by step

workaround maybe a command line that opens the git conflicts in vs code and the extension ads them aider

could also be helpful to add all files with lint errors/warnings for that use case

On Fri, 5 Jul 2024 at 17:25, paul-gauthier @.***> wrote:

Thanks for trying aider and filing this issue.

If you have a file full of merge conflicts, you might try adding it to aider and asking it to fix them?

— Reply to this email directly, view it on GitHub https://github.com/paul-gauthier/aider/issues/800#issuecomment-2211140507, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACXJNRTBKQTZMY47ZI4NJD3ZK3CHLAVCNFSM6AAAAABKNNXBG6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJRGE2DANJQG4 . You are receiving this because you authored the thread.Message ID: @.***>