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
Merge generated changes automatically, updating the working directory.
38
+
This option can be repeated up to 3 times, with the following behavior at each level:
39
+
+
40
+
* `-a`: Merge changes conservatively, flagging any conflicts for manual user resolution.
41
+
* `-aa`: Merge changes aggressively, resolving all conflicts in favor of the generated change.
42
+
* `-aaa`: Merge changes aggressively (same as `-aa`) then run `--quit` automatically.
43
+
+
44
+
By default, changes are not merged - keeping the working directory untouched.
45
+
A different default can be set in the configuration file.
46
+
When doing so, the `--no-accept` flag can be used to disable merging at CLI invocation time.
39
47
40
48
-b BOT::
41
49
--bot=BOT::
42
-
Bot name.
50
+
Bot name.
51
+
Defaults to the first bot defined in the configuration.
43
52
44
53
-e::
45
54
--edit::
46
-
Enable interactive editing of draft prompts and templates.
47
-
See `--generate` and `--show-templates` for details.
55
+
Enable interactive editing of draft prompts and templates.
56
+
See `--new` and `--templates` for details.
48
57
49
58
-h::
50
59
--help::
51
-
Show help message and exit.
60
+
Show help message and exit.
52
61
53
62
-j::
54
63
--json::
55
64
Use JSON output.
56
65
57
-
--log::
66
+
--log-path::
58
67
Show log path and exit.
59
68
60
69
-N::
61
70
--new::
62
-
Create an AI-generated draft.
63
-
If the `--edit` option is set, an interactive editor will be open with the rendered prompt to allow modification before it is forwarded to the bot.
71
+
Create an AI-generated draft.
72
+
If the `--edit` option is set, an interactive editor will be opened with the rendered prompt to allow modification before it is forwarded to the bot.
64
73
65
74
-Q::
66
75
--quit::
67
-
Go back to the draft's origin branch with the current working directory.
76
+
Go back to the draft's origin branch, keeping the working directory's current state.
77
+
This will delete the draft branch and its upstream.
78
+
Generated commits remain available via `ref/drafts`.
68
79
69
80
--root::
70
-
Repository search root.
81
+
Repository search root.
82
+
Defaults to the current working directory.
71
83
72
84
-T::
73
85
--templates::
74
-
With no argument, lists available templates.
75
-
With an template name argument, displays the corresponding template's contents or, if the `--edit` option is set, opens an interactive editor.
86
+
With no argument, lists available templates.
87
+
With an template name argument, displays the corresponding template's contents or, if the `--edit` option is set, opens an interactive editor.
76
88
77
89
--version::
78
-
Show version and exit.
90
+
Show version and exit.
79
91
80
92
81
93
== Examples
82
94
83
-
The workhorse command is `git draft --generate` which leverages AI to edit our code.
95
+
The workhorse command is `git draft --new` which leverages AI to edit code.
84
96
A prompt can be specified as standard input, for example `echo "Add a test for compute_offset in chart.py" | git draft --generate`.
85
97
If no prompt is specified and stdin is a TTY, `$EDITOR` will be opened to enter the prompt.
86
98
@@ -93,14 +105,6 @@ This will check out the branch used when creating the draft, adding the final st
93
105
Note that you can come back to an existing draft anytime (by checking its branch out), but you will not be able to apply it if its origin branch has moved since the draft was created.
94
106
95
107
96
-
* Generate: create a new draft to the current folio, or create a new folio if none exists.
97
-
* Finalize
98
-
** Apply: include changes into origin branch.
99
-
** Discard: abandon folio.
100
-
** Save: return to original branch. Q: how to load after?
0 commit comments