Git push –force from IntelliJ IDEA
It seems that the force option was removed from the pushing dialog. I am currently using IntelliJ IDEA 13.1.1 and I cannot find any way how to push with fore option. I tried to search the documentation and it seems that in version 10 the force option was still there. Do you maybe know how to push with force from IntelliJ IDEA?
2 Solutions collect form web for “Git push –force from IntelliJ IDEA”
As far as issue 85773 is concerned, that option shouldn’t be in the GUI yet (for IDEA 11-12 or 13+).
And it would be disabled when on the master branch.
That is why issue 76252 advocates to be able to type git commands in the git console: that way, you still have a way to execute the right command, without leaving the IDE.
Update November 2014, for IntelliJ 14 (won’t be backported to 13):
To enable the feature user have to select “Allow force push” in Settings | Version Control | Git“.
As some additional protection we’ve added a configuration option there to specify the list of “protected” branches, i.e. branches which are not allowed to be force pushed to.
The value is saved in
.idea/vcs.xmland thus is shared among the team.
Since IntelliJ IDEA 14 update it’s possible to enable a checkbox for exactly that, you first have to enable “Allow force push” in Settings->Version Control->Git.