My open source command line tool aider [0] is specifically for this use case of working with GPT on an existing code base.
Let me know if you have a chance to try it out.
Here is a chat transcript [1] that illustrates how you can use aider to explore an existing git repo, understand it and then make changes. As another example I needed a new feature in the glow tool and was able to make a PR [2] for it, even though I don't know anything about that codebase or even how to write golang.
[0] https://github.com/paul-gauthier/aider