How to stop agents creating branches when using "Commit and push"

I’m working on a solo project so I’m just working on main for most things. I’ve been using the new “commit and push” button (Not “Create branch, commit and push”), but its still creating a new branch every-time.

Is this a bug or am i doing something wrong?

Thanks!

This is most likely caused by a Branch Prefix setting in your Git configuration. When a branch prefix is set, Cursor will instruct the agent to create a new branch before committing — even when you select “Commit & Push” — as a guardrail to prevent accidental pushes to the default branch.

To fix this:

  1. Open Cursor Settings (gear icon or Cmd+,)

  2. Go to Features

  3. Scroll to the Git section

  4. Check if the Branch Prefix field has a value (e.g., cursor/ or similar). If so, clear it

Once cleared, “Commit & Push” should commit and push directly to your current branch without creating a new one.

If you don’t have a branch prefix set and the issue persists, let me know and I’ll dig deeper!

I have this issue also and here is my parameter :

The screenshot confirms the cause. You have cursor/ set as your Branch Prefix — clear that field entirely, and “Commit & Push” should work as expected, committing directly to your current branch without creating a new one.

The field is empty, it gets cursor/ as placeholder. Do I need to put a space ?

You’re right — that cursor/ is just placeholder text, not an actual value.

After looking into this more deeply, this seems like a bug. I’m flagging this to the relevant team. Thanks for sharing the information.

Same for me, branch prefix is also empty.