Hi @KAZUNORI KOBAYASHI
This is a UX design flaw/trap. You're welcome to submit a ticket to them stating your modal.
However, here are a few practical ways to prevent this from happening:
If you have admin access (or can speak to your Bitbucket administrator), you can set up guardrails so the server automatically rejects short or incomplete messages:
- Native Jira Integration: Enable Repository settings > Jira issues to reject any commit message that doesn't include a valid Jira issue key.
- Commit Checker Apps: Use Marketplace tools like Yet Another Commit Checker or Better Commit Policy to enforce a minimum character length or standard formats (like Conventional Commits).
- ScriptRunner / Git Hooks: Implement a custom pre-receive hook to reject single-line or overly short commit messages.
Fix the Incomplete Commit Message
Since Git history cannot be edited directly in the web UI without rewriting history, you can fix the message locally via CLI:
git fetch origin
git checkout <your-branch>
git commit --amend -m "Your complete commit message"
git push --force-with-lease origin <your-branch>
Important Caveats to Keep in Mind
- Branch Restrictions: If the online edit was done on a protected branch like main or master, Bitbucket may block force-pushing depending on repository permissions. An admin would either need to temporarily allow force pushes, or you'd need to live with the bad commit message.
- Team Coordination: If someone else on your team already ran git pull and downloaded the incomplete commit message onto their machine before you force-pushed the fix, their local history will diverge.
- Force-pushing is safest on personal feature branches or feature branches where team members are aware of the update.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.