When I make a new bash shell script or make changes to a new shell script, and I click the button to Generate Commit Message, the commit message fills with a description of the previous commit’s changes, and not the current working changes.
Steps to Reproduce
Make changes to a script.sh file
Click Generate Commit Message button
Expected Behavior
It should inspect the actual changes
Operating System
MacOS
Current Cursor Version (Menu → About Cursor → Copy)
Hey, thanks for the report. We’ve seen a similar issue with commit message generation, and in another case opening the project with a clean profile helped.
Can you try running:
cursor --user-data-dir=/tmp/cursor-test
Then check if commit message generation works for a bash script?
It’d also help to get some diagnostics:
Cmd+Shift+P → Git: Show Git Output: please share the logs, especially when you click Generate Commit Message
Help → Toggle Developer Tools → Console: please share a screenshot of any errors that mention git
Are you using a multi-root workspace, or any special Git configuration?
Thanks for your quick response. This issue seems to be intermittent and I’m not sure what the proper reproduction steps are. My git setup is pretty basic except I am using submodules. It seems to happen after I’ve been in Cursor a long time, producing a lot of code, committing commits, and then I’ll get to a point where I’m editing scripts and it’ll show up. Simply restarting Cursor did seem to fix it for now. I’ll reply with your diagnostic suggestions when this happens again.
There is nothing interesting showing up in the git log and there are no errors in the developer console. Attaching a screenshot for posterity. The generate commit message seems to have generated content referring to the previous commit:
Enhance TypeScript configuration by adding “strict” mode and updating “compilerOptions” in tsconfig.json for better type safety and error checking.
Actually, here is another screenshot which do have some developer console errors mentioning git when Cursor starts up fresh, and no action was even taken:
workbench.desktop.main.1s:13199
[Background Composer] Error updating branch on git status change: Error: No Tull commit provider registered