You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-8Lines changed: 7 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,10 +2,8 @@
2
2
3
3
git2gpt is a command-line utility that converts a Git repository to text for loading into ChatGPT and other NLP models. The output text file represents the Git repository in a structured format. You can also add a `.gptignore` file to your repos to have git2gpt ignore certain files. The text is prefixed with a preamble that explains to the AI what the text is:
4
4
5
-
6
5
> The following text is a Git repository with code. The structure of the text are sections that begin with ----, followed by a single line containing the file path and file name, followed by a variable amount of lines containing the file contents. The text representing the Git repository ends when the symbols --END-- are encounted. Any further text beyond --END-- are meant to be interpreted as instructions using the aforementioned Git repository as context.
7
6
8
-
9
7
## Installation
10
8
11
9
First, make sure you have the Go programming language installed on your system. You can download it from [the official Go website](https://golang.org/dl/).
@@ -32,12 +30,13 @@ By default, your `.git` directory and your `.gitignore` files are ignored. Any f
32
30
33
31
### Flags
34
32
35
-
*`-p`, `--preamble`: Path to a text file containing a preamble to include at the beginning of the output file.
36
-
*`-o`, `--output`: Path to the output file. If not specified, will print to standard output.
37
-
*`-e`, `--estimate`: Estimate the tokens of the output file. If not specified, does not estimate.
38
-
*`-j`, `--json`: Output to JSON rather than plain text. Use with `-o` to specify the output file.
39
-
*`-i`, `--ignore`: Path to the `.gptignore` file. If not specified, will look for a `.gptignore` file in the same directory as the `.gitignore` file.
40
-
*`-g`, `--ignore-gitignore`: Ignore the `.gitignore` file.
33
+
*`-p`, `--preamble`: Path to a text file containing a preamble to include at the beginning of the output file.
34
+
*`-o`, `--output`: Path to the output file. If not specified, will print to standard output.
35
+
*`-e`, `--estimate`: Estimate the tokens of the output file. If not specified, does not estimate.
36
+
*`-j`, `--json`: Output to JSON rather than plain text. Use with `-o` to specify the output file.
37
+
*`-i`, `--ignore`: Path to the `.gptignore` file. If not specified, will look for a `.gptignore` file in the same directory as the `.gitignore` file.
38
+
*`-g`, `--ignore-gitignore`: Ignore the `.gitignore` file.
39
+
*`-s`, `--scrub-comments`: Remove comments from the output file to save tokens.
0 commit comments