chand1012/git2gpt — reverse-engineered prompt
Reverse engineered prompt
Build me a small Go command line tool that takes the path to a Git repository and turns the repo into one clean text file that I can paste into ChatGPT or another AI tool.
It should walk through the files, skip the .git folder, respect .gitignore by default, and let me add a .gptignore file for extra things to leave out. I also want a .gptinclude option so I can choose only certain files or folders when a repo is too big. The text output should have a clear preamble explaining that it contains a repository, then list each file path and its contents in a structured way, with a clear ending marker.
Please include normal command line flags for choosing an output file, using a custom preamble, estimating token count, outputting JSON or XML instead of plain text, ignoring .gitignore, and stripping comments to save space. Make it easy to install with Go and include a helpful README with usage examples.
Want more depth? Deep Reverse