IntelliJ IDEA and specifying GIT refspecs

1.4k Views Asked by At

I've been using Eclipse with GIT and Gerrit for a long time but decided to give community edition of IntelliJ IDEA (12.1.3) a try. I'm able to fetch and pull changes from our repository but I can't find an option in IntelliJ where I can specify refspecs for push operations. Is there a way to do this within IntelliJ?

3

There are 3 best solutions below

1
On BEST ANSWER

Git Push from IDEA pushes only the current branch, and I don't think it will change in future. However, you may specify the target branch in the text field below the commits to be pushed. There is a couple of problems with usability like IDEA-98693, but hopefully they will be fixed in the next version.

0
On

When using IntelliJ together with Gerrit, you could use the intellij-gerrit-plugin. It also has Gerrit specific push support (refs/for target branch).

http://plugins.jetbrains.com/plugin/7272

0
On

In PUSH dialog choose option "Push current branch to alternative branch", choose remote repository and type /refs/for/'branch' in text fields. It works in IDEA 13.0.2