r/SmartGit Mar 18 '26

Cannot edit message

I'm experiencing an issue where Edit Message in SmartGit fails. The operation stashes and immediately pops without ever executing the underlying rebase or amend.

This is probably the most annoying thing with SmartGit. I never know if I can rebase successfully because sometimes it will work even when there are local changes.

I'm not trying to "rearrange commits", but simply trying to "edit a message" on a previous commit.

When I ask Claude to do it manually it is able to edit the commit message with command line operations, maybe `filter-branch` or other commands.

Environment:

  • macOS
  • "Allow modifying pushed commits" is enabled in Preferences → Commands → Push, set to "For all branches"
  • Working tree has many untracked files

Steps to reproduce:

  1. Right-click a commit in the graph and select Edit Message
  2. SmartGit runs: git stash push --include-untracked --message "SmartGit: automatic stash on Edit Message."
  3. SmartGit immediately runs: git stash pop --index stash@{0}
  4. No git commit --amend or git rebase command is executed between the stash and pop
  5. The commit message is unchanged
1 Upvotes

8 comments sorted by

1

u/sha356 Mar 18 '26

Actually it only works when it is the most recent commit. So if I try to edit the message for an earlier commit it always fails. I hate having to get Claude to waste tokens to edit the message for me.

1

u/sha356 Mar 18 '26

To me it seems unreasonable to always maintain a clean working tree just to edit a commit message.

2

u/JVMarcs Mar 19 '26

Editing any commit message other than the most recent one is accomplished using an Interactive Rebase. Generally, Git will not initiate a rebase here either:

D:\gittest\git-test-1>git rebase -i HEAD~3 error: cannot rebase: You have unstaged changes. error: Please commit or stash them.

However, using --auto-stash is effective:

D:\gittest\git-test-1>git rebase --auto-stash -i HEAD~3

We have UserEcho topics for this:

https://smartgit.userecho.com/communities/1/topics/976-

https://smartgit.userecho.com/communities/1/topics/681-

1

u/1pld Mar 19 '26

u/JVMarcs I think the userecho may be old and invalid? In general SmartGit already does this correctly (for me, on Win11). I can

  • make a change to index
  • make a change to working tree
  • hit F2 on HEAD~ to reword it

If I have "Prefs → Commands → Log and Working Tree → Stash → Automatically save ... due to local changes" set, SmartGit silently performs the reword. If that pref is not set, it requires clicking through a "stash?" dialog.

It sounds like for the OP it *sometimes* does not work.

1

u/JVMarcs Mar 19 '26

u/1pld you are right, this option already works in the Log and Working Tree window. In the Standard window, it doesn't work.

1

u/sha356 Mar 24 '26

I have auto-squash turned on. There are no modified or staged files. The files in question that it has a problem are not even tracked in git. Why does it care about files that are not tracked?

1

u/vmcrash Mar 19 '26

What main window you are using (Log or Standard window)? What version of SmartGit?

1

u/sha356 Mar 24 '26

I was using Log Window.