gims 0.5.2 → 0.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -109,6 +109,7 @@ g o
109
109
  | `gims online` | `g o` | AI commit + push (use `--set-upstream` on first push) | `g o --set-upstream` |
110
110
  | `gims commit <message...>` | `g m` | Commit with a custom message (no AI) | `g m "fix: handle empty input"` |
111
111
  | `gims pull` | `g p` | Pull latest changes | `g p` |
112
+ | `gims amend` | `g a` | Stage all changes and amend the last commit (reuse message) | `g a` |
112
113
  | `gims list` | `g ls` | Show numbered commit history | `g ls` |
113
114
  | `gims largelist` | `g ll` | Detailed commit history | `g ll` |
114
115
  | `gims branch <n>` | `g b` | Branch from commit #n | `g b 3 feature-x` |
@@ -301,4 +302,4 @@ MIT © [Your Name](https://github.com/yourusername)
301
302
 
302
303
  *Made with ❤️ by developers who hate writing commit messages*
303
304
 
304
- </div>
305
+ </div>
package/bin/gims.js CHANGED
@@ -542,6 +542,32 @@ program.command('pull').alias('p')
542
542
  catch (e) { handleError('Pull error', e); }
543
543
  });
544
544
 
545
+ program.command('amend').alias('a')
546
+ .description('Stage all changes and amend last commit (no message edit)')
547
+ .action(async () => {
548
+ await ensureRepo();
549
+ try {
550
+ const { all } = await safeLog();
551
+ if (!all || all.length === 0) {
552
+ console.log('No commits to amend. Make an initial commit first.');
553
+ return;
554
+ }
555
+
556
+ await git.add('.');
557
+
558
+ const rawDiff = await git.diff(['--cached', '--no-ext-diff']);
559
+ if (!rawDiff.trim()) {
560
+ console.log('No staged changes to amend.');
561
+ return;
562
+ }
563
+
564
+ await git.raw(['commit', '--amend', '--no-edit']);
565
+ console.log('Amended last commit with staged changes.');
566
+ } catch (e) {
567
+ handleError('Amend error', e);
568
+ }
569
+ });
570
+
545
571
  program.command('list').alias('ls')
546
572
  .description('Short numbered git log (oldest → newest)')
547
573
  .action(async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gims",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "description": "Git Made Simple – AI‑powered git helper using Gemini / OpenAI",
5
5
  "author": "S41R4J",
6
6
  "license": "MIT",
Binary file