Commit 7cc4276
committed
forgit: Add interactive git discard command
Currently, unstaging and reverting uncommitted changes requires
running separate git reset and git checkout commands. This is
error-prone and lacks the interactive file selection that other
forgit commands provide, forcing users to manually specify files or
risk discarding unintended changes.
Add forgit_discard (gdc) command that combines unstaging and
reverting into a single interactive operation. This provides a safer
workflow by showing a preview of changes before discarding and allows
selective file-by-file confirmation, consistent with forgit's design
philosophy of making destructive operations more deliberate.
Signed-off-by: Javier Tia <floss@jetm.me>1 parent d99f7f0 commit 7cc4276
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| 147 | + | |
| 148 | + | |
147 | 149 | | |
148 | 150 | | |
149 | 151 | | |
| |||
222 | 224 | | |
223 | 225 | | |
224 | 226 | | |
| 227 | + | |
225 | 228 | | |
226 | 229 | | |
227 | 230 | | |
| |||
286 | 289 | | |
287 | 290 | | |
288 | 291 | | |
| 292 | + | |
289 | 293 | | |
290 | 294 | | |
291 | 295 | | |
| |||
346 | 350 | | |
347 | 351 | | |
348 | 352 | | |
| 353 | + | |
349 | 354 | | |
350 | 355 | | |
351 | 356 | | |
| |||
396 | 401 | | |
397 | 402 | | |
398 | 403 | | |
| 404 | + | |
399 | 405 | | |
400 | 406 | | |
401 | 407 | | |
| |||
0 commit comments