By default, force push is protected on the master and main branches in IntelliJ.
Let's explore how to resolve this.
To automate deployment using GitHub Actions, I encountered several syntax errors.
As a result, messy test code was left in the commit log, and I needed to enable force push to clean it up.
Search Everywhere
window.Search Everywhere
window, type "Protected branches:" and click on the matching item.settings
window, locate the Protected branches:
field and delete its contents.Since GitHub and GitLab have branch protection features, you need to check the settings of each repository.